FZU Problem 2146 Easy Game ( 数学啊)
来源:互联网 发布:简洁大气 网站 源码 编辑:程序博客网 时间:2024/06/10 00:02
题目链接:http://acm.fzu.edu.cn/problem.php?pid=2146
Problem 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 <cstdio>#include <cstring>int main(){ char s[10087]; int cas = 0; int t; scanf("%d",&t); while(t--) { scanf("%s",s); int len=strlen(s); printf("Case %d: ",++cas); if(len%2) printf("Odd\n"); else printf("Even\n"); } return 0;}
- FZU Problem 2146 Easy Game ( 数学啊)
- FZU-Problem 2146 Easy Game
- FZU 2146 Easy Game
- FZU-2146 Easy Game
- FZU 2146 Easy Game
- FZU Problem 2147 A-B Game (数学啊)
- FZU Problem 2151 OOXX Game (数学啊)
- A Easy Game(FZU 2146)
- FZU Easy Game
- Another Easy Problem FZU
- FZU Problem 2110 Star (数学啊 )
- fzu 1753 Another Easy Problem
- 【树链剖分】 FZU 2176 easy problem
- FZU Problem 2104 Floor problem (数学啊 )
- fzu 2146 Easy Game & 2147 A-B Game & 2151 OOXX Game(水题)
- FZU Problem 2144 Shooting Game
- FZU-Problem 2150 Fire Game
- FZU Problem 2150 Fire Game (双起点BFS啊 )
- 为Golang程序打上编译标记
- 社交招聘网络Linkedin的使用体验(HR招聘篇8)
- keychain的使用
- 从github下载最新Android源码
- kruskalMST
- FZU Problem 2146 Easy Game ( 数学啊)
- DLL中调用约定和名称修饰
- 11091 最优自然数分解问题(贪心)
- 连接MySQL数据库时出现The dirver has not received any packets from the server
- 社交招聘网络Linkedin的使用体验(HR招聘篇9)
- java正则表达式实例积累
- NSString去空格和换行
- IOS TextField设置大全
- 社交招聘网络Linkedin的使用体验(HR招聘篇10)