Run ID 作者 问题 语言 测评结果 分数 时间 内存 代码长度 提交时间
14215 c292user2 [USACO09OCT]Even? Odd? G C++ 通过 100 1 MS 700 KB 371 2021-07-10 20:41:46

Tests(30/30):


#include<bits/stdc++.h> using namespace std; int main(){ int n,len; char a[100]; cin>>n; // cout << "n = " << n << endl; for(int i=0;i<n;i++){ // gets(a); cin >> a; // cout << "a = " << (int)a[0] << endl; len=strlen(a); if((a[len-1]-'0')%2==0) cout<<"even"<<endl; else cout<<"odd"<<endl; } return 0; }


测评信息: