早教吧 育儿知识 作业答案 考试题库 百科 知识分享

c语言问题,做错了好几遍描述Zombieslovetoeatbrains.Yum.僵尸喜欢吃脑子。百胜餐饮集团。Input输入Thefirstlinecontainsasingleintegernindicatingthenumberofdatasets.第一行包含一个整数N表示数据集

题目详情
c语言问题,做错了好几遍
描述
Zombies love to eat brains. Yum.
僵尸喜欢吃脑子。百胜餐饮集团。
Input
输入
The first line contains a single integer n indicating the number of data sets.
第一行包含一个整数N表示数据集的数目。
The following n lines each represent a data set. Each data set will be formatted according to the following description:
以下N行每行代表一个数据集。每个数据集的格式如下:
A single data set consists of a line "X Y", where X is the number of brains the zombie eats and Y is the number of brains the zombie requires to stay alive.
一个单一的数据集由一个线“X Y”,其中X是大脑的僵尸吃数和Y是大脑的数量需要活僵尸。
Output
输出
For each data set, there will be exactly one line of output. This line will be "MMM BRAINS" if the number of brains the zombie eats is greater than or equal to the number of brains the zombie requires to stay alive. Otherwise, the line will be "NO BRAINS".
对于每个数据集,将有整整一行输出。这条线将“MMM BRAINS”,如果大脑的僵尸吃数大于或等于大脑的数量需要活僵尸。否则,该线将“无脑”。
Sample Input
样本输入
3
3
4 5
4 5
3 3
3 3
4 3
4 3
Sample Output
样本输出
NO BRAINS
没有头脑的
MMM BRAINS
我的大脑
MMM BRAINS
我的大脑
▼优质解答
答案和解析
#include
int main()
{
int t,x,y;
scanf("%d",&t);
while(t--)
{
scanf("%d%d",&x,&y);
if(x>=y)puts("MMM BRAINS");
else puts("NO BRAINS");
}
return 0;
}
看了 c语言问题,做错了好几遍描述...的网友还看了以下:

豌豆射手每4秒钟发出一发炮弹,炮弹速度为9米/秒,僵尸的速度为3米/秒.问:当僵尸出现在豌豆射手的  2020-04-27 …

诗歌首句中一个“僵”字,写出诗人晚年生活的(十一月四日风雨大作(陆游)僵卧孤村不自哀,尚思为国戍轮  2020-06-28 …

下列各项中,标点符号使用正确的一项是A.你的电脑很可能在黑客肆虐之下,沦为一具“僵尸”,与网络上无  2020-06-28 …

下列各项中,标点符号使用正确的一项是A.你的电脑很可能在黑客肆虐之下,沦为一具“僵尸”,与网络上无  2020-06-28 …

下列各组句子中,标点符号使用正确的一项是()A.你的电脑很可能在黑客肆虐之下,沦为一具“僵尸”,与  2020-06-28 …

现在考虑“植物大战僵尸”游戏中的一些简单模型(参赛者不必更深入地了解该游戏).现在只有三种角色:向  2020-06-28 …

下列各项中,标点符号使用正确的一项是A.你的电脑很可能在黑客肆虐之下,沦为一具“僵尸”,与网络上无  2020-07-10 …

假设已经获得未知参i数u的5个置信区间,每个置信区间的置信水平都是95%,求至少有一个区间不包含u  2020-07-11 …

有位登山者,途中遇到暴风雪,他深知如果找不到避风之处必死无疑。他走啊走,突然脚下碰到一个僵硬的东西,  2020-12-03 …

阅读下面古诗。(5分)十一月四日风雨大作陆游僵卧孤村不自哀,尚思为国戍轮台。夜阑卧听风吹雨,铁马冰河  2020-12-09 …