水题
来源:互联网 发布:耳饰饰品店 知乎 编辑:程序博客网 时间:2024/06/06 06:29
D - 水题
Time Limit:1000MS Memory Limit:32768KB 64bit IO Format:%I64d & %I64uDescription
胖哥自从当上公务员,赢取白富美,走向人生巅峰后,已经懒散到不想出题了,不仅如此,他连题目都懒得看了,现在他只会根据题目第一个单词的长度判定这个题目的难度
如果题目的第一个单词太长(长度大于3),他会说这题太难,不可能想的出来; 如果题目的第一个单词太短(长度不大于3),他会说这题太简单,懒得去想
现在给定一个题目,L想知道胖哥对于这道题会作出什么反应
Input
首先是一个正整数cas,表示有cas组输入,cas<=100
对于每组输入,会给出一行,每行表示一个题目,每个题目只会由大写字母,小写字母或者空格构成,每行的第一个字符一定不会是空格,多个空格可能连续出现,每行最多200个字符
Output
对于每个题目,如果胖哥觉得这题太难,输出"Too hard!",否则输出"Too easy!"
Sample Input
12If the day is doneIf birds sing no moreIf the wind has fiagged tiredThen draw the veil of darkness thick upon meEven as thou hast wrapt the earth with The coverlet of sleep and tenderly closedThe petals of the drooping lotus at duskFrom the travereWhose sack of provisions is empty before the voyage is endedWhose garment is torn and dustladenWhose strength is exhausted remove shame and povertyAnd renew his life like a flower underThe cover of thy kindly night
Sample Output
Too easy!Too easy!Too easy!Too hard!Too hard!Too easy!Too hard!Too hard!Too hard!Too hard!Too easy!Too easy!
#include<stdio.h>
#include<string.h>int main()
{
int t,i,len;
scanf("%d",&t);
getchar();
while(t--)
{
len=0;
int i;
char a[201];
gets(a);
for(i=0;a[i]!='\0';i++)
{
if(a[i]!=' ')
len++;
else
break;
}
if(len>3)
printf("Too hard!\n");
else
printf("Too easy!\n");
}
}
0 0
- 水题
- 水题
- 水题
- 水题
- 【水题】
- 水题
- 水题:
- 水题
- 水题~
- 水题
- 水题
- 水题
- 水题
- 水题
- 水题
- 【水题】
- 水题
- 水题
- 行人检测 读书笔记 综述(3)2007
- 跨线程实时更新进度类
- uva 11491 Erasing and Winning 奖品的价值 (单调队列)
- 第八届河南省赛 引水工程【最小生成树(克鲁斯卡尔)】
- 设计模式——工厂模式和策略模式的区别
- 水题
- npm
- 全面介绍Windows内存管理机制及C++内存分配实例
- 越努力,越幸运
- [C语言][LeetCode][203]Remove Linked List Elements
- Windows下安装SuperLU
- Java源码分析:深入探讨Iterator模式
- 搜索旋转排序数组
- bzoj 4198(哈夫曼编码)