FZU-2146 Easy Game

来源:互联网 发布:马尔可夫矩阵的计算题 编辑:程序博客网 时间:2024/06/05 10:24
#include <iostream>#include <cstdio>#include <cstring>#include <string>using namespace std;int t, cas;string str;int main(){    cas = 0;    scanf("%d", & t);    while(t --)    {        cin >> str;        int len = str.length();        if(len % 2 == 0)            printf("Case %d: Even\n", ++cas);        else            printf("Case %d: Odd\n", ++cas);    }    return 0;}

题意:
输入字符串,判断字符串长度是奇数还是偶数。
题解:
水。

0 0
原创粉丝点击