Easy Game
来源:互联网 发布:淘宝该版本不支持授权 编辑:程序博客网 时间:2024/05/18 00:26
总时间限制: 1000ms 内存限制: 32768kB
描述
Fat brother(胖哥) and Maze(梅兹) are playing a kindof special 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 whether this number is even(偶数).
输入
The first line of the data 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. Now that S only contains lower case letters.
1 <= T <= 100, the length of the string is less than 10086
输出
For each case, output the case number first, and then output “Odd”
if the length of S is odd, otherwise just output “Even”.
样例输入
4
Well
Thisisthesimplest
problem
inthiscontest
样例输出
Case 1: Even
Case 2: Odd
Case 3: Odd
Case 4: Odd
来源
第四届福建省大学生程序设计竞赛
#include<iostream>#include<stdio.h>#include<string.h>using namespace std;char a[20000];int main(){int nc;cin >> nc;for(int i = 0 ; i < nc ; i++){scanf("%s",a);cout << "Case " << i + 1 << ": ";if(strlen(a)%2)cout<<"Odd"<<endl;elsecout<<"Even"<<endl;}return 0;}
0 0
- Easy Game
- Easy Game
- C - Easy Game
- lightoj 1031 - Easy Game
- ZOJ_3791_An Easy Game(DP)
- FZU 2146 Easy Game
- FZU2146 Easy Game
- lightoj 1031 - Easy Game
- FZU-2146 Easy Game
- LightOJ 1031-Easy Game
- FZU 2146 Easy Game
- 292. Nim Game #Easy
- FZU Easy Game
- [Easy] Nim Game
- Lightoj 1031 - Easy Game DP
- zoj3791(An Easy Game) DP
- ZOJ 3791 An Easy Game
- ZOJ 3791 An Easy Game
- DLL 基于IHE ITI-ATNA技术规范的区域医疗信息共享安全问题解决方案
- Android Studio系列教程四--Gradle基础
- UIButton: set image for selected-highlighted state
- 单链表排序方法
- 获取当天的年,月,日,星期。
- Easy Game
- 网站制作笔记二之建站工具和准备
- java日常小笔记
- C语言:day12~通讯录
- [Elasticsearch]查询语法速查
- <iOS>AFNetworking使用介绍
- 【Java开发】--jdom解析xml-创建xml
- PetShop学习记录----数据库访问
- 单链表排序