POJ 2017 No Brainer(超级水题)
2024-09-04 17:14:30
一、Description
Zombies love to eat brains. Yum.
Input
The first line contains a single integer n 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.
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.
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".
二、题解
只做为工作记录,不多说。
三、Java代码
the line will be "NO BRAINS".
二、题解
只做为工作记录,不多说。
三、Java代码
import java.util.Scanner; public class Main { public static void main(String[] args) {
Scanner cin = new Scanner(System.in);
int n,i,a,b;
n=cin.nextInt();
for(i=1;i<=n;i++){
a=cin.nextInt();
b=cin.nextInt();
if(a>=b)
System.out.println("MMM BRAINS");
else
System.out.println("NO BRAINS");
}
}
}
版权声明:本文为博主原创文章,未经博主允许不得转载。
最新文章
- sql中的inner join ,left join ,right join
- html5入门
- Cocoa是什么?
- linux入门教程(二) 图形界面还是命令窗口
- wav文件格式分析详解
- ASP.NET入门(class0612)
- 3分钟学会sessionStorage用法(h5页面返回滚动到上次浏览器位置)
- codeforces284 div1 B:概率dp
- 一般增广路方法求网络最大流(Ford-Fulkerson算法)
- IDEA的导包优化问题
- 2018-计算机系机试(第二批)-B-二进制输出
- vue版 文件下载
- 深入理解[Master-Worker模式]原理与技术
- 在VS代码中编辑Python
- ElasticSearch 2 (31) - 信息聚合系列之时间处理
- ajax jquery 异步表单验证
- 加密文件之Java改进版
- Laravel框架初学一路由(路由参数)
- week1-绪论
- C#-输入输出,类型,运算符,语句的练习——★判断年份是否是闰年★