2016年10月20日 星期四

TIOJ 1109 - [入門] Anapneo

http://tioj.infor.org/problems/1109

直接輸出 什麼都不用管(?

沒有版的code還是好可愛

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
#include<bits/stdc++.h>
using namespace std;
int n,k,i;
string s;
int main(){
    cin.tie(0);
    ios_base::sync_with_stdio(0);
    while(cin>>n>>k){
        for(i=0;i<n;i++){
            cin>>s;
            if(i==n-k){
                cout<<s<<'\n';
            }
        }
    }
}

沒有留言:

張貼留言