早教吧作业答案频道 -->其他-->
C++题怎么解决x,y的范围问题是10的101次幂Introduction:Zombieslovetoeatbrains.Yum.Input:Thefirstlinecontainsasingleintegern(n≤20)indicatingthenumberofdatasets.Thefollowingnlineseachrepresentadataset.Eachdat
题目详情
C++题 怎么解决x,y的范围问题 是10的101次幂
Introduction:
Zombies love to eat brains.Yum.
Input:
The first line contains a single integer n (n ≤ 20) indicating the number of data sets.
The following n lines each represent a data set.Each data set will be formatted according to the following description:
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 < 10101
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".
Sample Input:
3
4 5
3 3
4 3
Sample Output:
NO BRAINS
MMM BRAINS
MMM BRAINS
Introduction:
Zombies love to eat brains.Yum.
Input:
The first line contains a single integer n (n ≤ 20) indicating the number of data sets.
The following n lines each represent a data set.Each data set will be formatted according to the following description:
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 < 10101
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".
Sample Input:
3
4 5
3 3
4 3
Sample Output:
NO BRAINS
MMM BRAINS
MMM BRAINS
▼优质解答
答案和解析
#include
int main()
{
int i;
int N,x,y;
scanf("%d",&N);
for(i=0;i=y) printf("MMM BRAINS\n");
else printf("NO BRAINS\n");
}
}
int main()
{
int i;
int N,x,y;
scanf("%d",&N);
for(i=0;i=y) printf("MMM BRAINS\n");
else printf("NO BRAINS\n");
}
}
看了 C++题怎么解决x,y的范围...的网友还看了以下:
u^2/(u^2+3u+2)=1+1/(u+1)-4/(u+2)等号左边是用什么方法变成等号右边的 2020-05-13 …
1:limu→∞(1+u^3)开4次方根/1+u求极限?2:lim(1-2/x)^(x/2)-1求 2020-05-17 …
不定积分中的递推公式由递推公式:不定积分du/(1+u^2)^2=1/2(2-1)[u/(u^2+ 2020-06-10 …
设y=x^u,求y^n=?这是书上的解法是y'=ux^(u-1),y''=u(u-1)x^(u-2 2020-06-18 …
相对论题目中洛伦兹变换和尺缩钟慢效应的使用区别有些题目中运用的是洛伦兹,而有些题目则直接运用尺缩钟 2020-07-02 …
微分方程x(du/dx)=-(u^2/1+u)的分离变量并积分的具体计算步骤是什么请详细写出来x- 2020-07-04 …
若z∈c,z的模等于1,u=z^2-z+1,则绝对值u的取值范围答案是闭区间0到3怎么算的? 2020-07-07 …
求平面x/3+y/4+z/5=1和柱面x2+y2=1的交线上与平面距离最短的点.求平面x/3+y/ 2020-07-30 …
函数w=1/z,把z平面上x^2+(y-1)^2=4映射成w平面上怎样的曲线?z=1/w=1/(u 2020-07-30 …
已知离散时间序列,计算卷积结果并绘制图形,标注清楚横纵坐标和零点位置已知离散时间序列x1(n)=u( 2020-12-24 …