FZU 2146
Time Limit:1000MS Memory Limit:32768KB 64bit IO Format:%I64d & %I64u
Description
Fat brother and Maze are playing a kind of special (hentai) game on a string S. Now they would like to count the length of this string. But as both Fat brother and Maze are programmers, they can recognize only two numbers 0 and 1. So instead of judging the length of this string, they decide to judge weather this number is even.
Input
The first line of the date is an integer T, which is the number of the text cases.
Then T cases follow, each case contains a line describe the string S in the treasure map. Not that S only contains lower case letters.
1 <= T <= 100, the length of the string is less than 10086
Output
For each case, output the case number first, and then output “Odd” if the length of S is odd, otherwise just output “Even”.
Sample Input
Sample Output
#include <stdio.h>
#include <string.h>
int main()
{
int T;
char s[];
int i,j,k,ca=;
scanf("%d",&T);
while(T--)
{
scanf("%s",s);
int l=strlen(s);
printf("Case %d: ",ca);
if(l%==)
printf("Even\n");
else
printf("Odd\n");
ca++;
}
return ;
}
FZU 2146的更多相关文章
- fzu 2146 Easy Game
http://acm.fzu.edu.cn/problem.php?pid=2146 Problem 2146 Easy Game Accept: 661 Submit: 915Time Li ...
- FZU 2137 奇异字符串 后缀树组+RMQ
题目连接:http://acm.fzu.edu.cn/problem.php?pid=2137 题解: 枚举x位置,向左右延伸计算答案 如何计算答案:对字符串建立SA,那么对于想双延伸的长度L,假如有 ...
- FZU 1914 单调队列
题目链接:http://acm.fzu.edu.cn/problem.php?pid=1914 题意: 给出一个数列,如果它的前i(1<=i<=n)项和都是正的,那么这个数列是正的,问这个 ...
- ACM: FZU 2105 Digits Count - 位运算的线段树【黑科技福利】
FZU 2105 Digits Count Time Limit:10000MS Memory Limit:262144KB 64bit IO Format:%I64d & ...
- FZU 2112 并查集、欧拉通路
原题:http://acm.fzu.edu.cn/problem.php?pid=2112 首先是,票上没有提到的点是不需要去的. 然后我们先考虑这个图有几个连通分量,我们可以用一个并查集来维护,假设 ...
- ACM: FZU 2107 Hua Rong Dao - DFS - 暴力
FZU 2107 Hua Rong Dao Time Limit:1000MS Memory Limit:32768KB 64bit IO Format:%I64d & %I6 ...
- ACM: FZU 2112 Tickets - 欧拉回路 - 并查集
FZU 2112 Tickets Time Limit:3000MS Memory Limit:32768KB 64bit IO Format:%I64d & %I64u P ...
- ACM: FZU 2102 Solve equation - 手速题
FZU 2102 Solve equation Time Limit:1000MS Memory Limit:32768KB 64bit IO Format:%I64d & ...
- ACM: FZU 2110 Star - 数学几何 - 水题
FZU 2110 Star Time Limit:1000MS Memory Limit:32768KB 64bit IO Format:%I64d & %I64u Pr ...
随机推荐
- 7. 星际争霸之php设计模式--中介者模式
题记==============================================================================本php设计模式专辑来源于博客(jymo ...
- imread函数、namedWindow函数、imshow函数、imwrite函数
1.imread函数 首先,我们看imread函数,可以在OpenCV官方文档中查到其原型如下: Mat imread(const string& filename, int flags=1 ...
- 高效的使用Response.Redirect解决一些不必要的问题(转载)
这篇文章主要介绍了如何高效的使用 Response.Redirect解决一些不必要的问题,需要的朋友可以参考下 介绍: 我正在评估一个 ASP.NET Web 项目应用.它有一些可扩展性问题.意味着当 ...
- Android BlueDroid(一):BlueDroid概述 【转】
转自:http://blog.csdn.net/xubin341719/article/details/40378205 版权声明:本文为博主原创文章,未经博主允许不得转载. 关键词:bluedroi ...
- oracle 日期格式
oracle 日期格式 to_date("要转换的字符串","转换的格式") 两个参数的格式必须匹配,否则会报错. 即按照第二个参数的格式解释第一个参数. ...
- WKWebView与Js实战(OC版)
前言 上一篇专门讲解了WKWebView相关的所有类.代理的所有API.那么本篇讲些什么呢?当然是实战了! 本篇文章教大家如何使用WKWebView去实现常用的一些API操作.当然,也会有如何与JS交 ...
- 使用磁盘为Linux添加swap
一.SWAP 说明 1.SWAP 概述 当系统的物理内存不够用的时候,就需要将物理内存中的一部分空间释放出来,以供当前运行的程序使用.那些被释放的空间可能来自一些很长时间没有什么操作的程序,这些被释放 ...
- 关闭用miniUI打开的窗口
miniUI打开的窗口用window.close关闭无效, 应该用window.CloseOwnerWindow();
- HDU 4712:Hamming Distance
Hamming Distance Time Limit: 6000/3000 MS (Java/Others) Memory Limit: 65535/65535 K (Java/Others) ...
- springMVC配置freemarker 二(问题讨论篇)
上面一篇我已经说明了如何去配置freemarker,这里我就谈谈遇到的问题吧. 首先, 为什么要删除上面之前的.你要使用freemarkerviewresolver和上面的冲突了,因此要注释掉上面的. ...