不要这么烦的,这题被你想烦了
```
var
i,j,k,n,m:longint;
a:array[1..100000] of char;
s:string;
begin
readln(n);
for i:= 1 to n do
begin
readln(s);
if odd(ord(s[length(s)])-48) then writeln('odd')
else writeln('even');
end;
end.
```
```
#include<cstdio>
#include<iostream>
using namespace std;
int n,a,b,c,d,f,i,j,k,m;
string ch;
int main(){
cin>>n;
for (i=1; i<=n; i++)
{
cin>>ch;
k=ch.length();
if (ch[k-1]%2==0) cout<<"even"<<endl;
else cout<<"odd"<<endl;
}
return 0;
}
```
by RKcer21 @ 2018-04-22 15:05:11
# #include <bits/stdc++.h>
using namespace std;
int n;
char a[10001];
int main () {
scanf("%d", &n);
while ( n -- )
{
scanf("%s", a);
int len = strlen (a);
if((a[len - 1] - '0') % 2 == 0)
{
printf("even\n");
continue;
}
printf("odd\n");
}
return 0;
}
@[rgq233666](/space/show?uid=33399) 直接输入一个数组,然后判断最后一位就行了.
by wxy_god @ 2018-07-31 21:36:50
@[rgq233666](/space/show?uid=33399) 数据大了呗
by 无声告白 @ 2018-08-09 15:51:47