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 ...
随机推荐
- scan design flow(二)
在scan stitch之后,scan synthesis就已经完成, Scan extraction主要用来从scan design中extracing所有的instance,来保证scan cha ...
- PTPX中的clock tree与LP design
PTPX在加入CPF/UPF这样的文件后,可以分析multi-voltage,power-gating这样的设计. 针对某个power rail的cell,PTPX支持进行annotate. set_ ...
- R语言书籍的学习路线图
现在对R感兴趣的人越来越多,很多人都想快速的掌握R语言,然而,由于目前大部分高校都没有开设R语言课程,这就导致很多人不知道如何着手学习R语言. 对于初学R语言的人,最常见的方式是:遇到不会的地方,就跑 ...
- zw版【转发·台湾nvp系列Delphi例程】HALCON 3D Position Of Circles
zw版[转发·台湾nvp系列Delphi例程]HALCON 3D Position Of Circles procedure TForm1.action();var ho_Image, ho_Elli ...
- 有图有真相——关于“视频专辑:零基础学习C语言 ”
- SSAS更改默认端口号,使用非默认端口号的时候Olap连接字符串的格式
Sql server的Analysis Service服务默认使用的是2382或2383端口,但是实际上我们可以通过配置文件手动更改SSAS使用其它端口号. 修改SSAS使用端口号的方法如下,找到你的 ...
- 我是如何对网站CSS进行架构的
by zhangxinxu from http://www.zhangxinxu.com 本文地址:http://www.zhangxinxu.com/wordpress/?p=944 一.写在前面的 ...
- webpack笔记_(3)_First_Project
知道了怎么样安装,那么学习一下简单的应用吧. 1.安装webpack npm install webpack -g (全局) npm install webpack --save--dev (本地) ...
- fprintf 读入%s,要注意
eg 文件内容faninfd 14 "%s %d",会把整行内容放到%s 而%d是乱码 ps: 文件内容是 1,2,3 “%d,%d,%d” 文件内容是1:2:3 ...
- Git的搭建和使用技巧完整精华版
[Git使用技巧] 1.把一个已经存在于版本库中的文件加入忽略提交文件(.gitignore)中,需要如下代码: git rm --cached [文件路径] 例如: git rm --cached ...