一、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.

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代码

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");
}
}
}

版权声明:本文为博主原创文章,未经博主允许不得转载。

最新文章

  1. sql中的inner join ,left join ,right join
  2. html5入门
  3. Cocoa是什么?
  4. linux入门教程(二) 图形界面还是命令窗口
  5. wav文件格式分析详解
  6. ASP.NET入门(class0612)
  7. 3分钟学会sessionStorage用法(h5页面返回滚动到上次浏览器位置)
  8. codeforces284 div1 B:概率dp
  9. 一般增广路方法求网络最大流(Ford-Fulkerson算法)
  10. IDEA的导包优化问题
  11. 2018-计算机系机试(第二批)-B-二进制输出
  12. vue版 文件下载
  13. 深入理解[Master-Worker模式]原理与技术
  14. 在VS代码中编辑Python
  15. ElasticSearch 2 (31) - 信息聚合系列之时间处理
  16. ajax jquery 异步表单验证
  17. 加密文件之Java改进版
  18. Laravel框架初学一路由(路由参数)
  19. week1-绪论
  20. C#-输入输出,类型,运算符,语句的练习——★判断年份是否是闰年★

热门文章

  1. 九度OJ 1000:计算a+b
  2. PostMan的使用注意事项
  3. Kafka具体解释二、怎样配置Kafka集群
  4. [iOS]通过JS调用iOS函数时的URL编码问题
  5. 了解CentOS服务器的基本信息
  6. TCP标准模板
  7. 为jquery添加扩展标准思路
  8. [原创]java WEB学习笔记21:MVC案例完整实践(part 2)---DAO层设计
  9. javascript箭头函数把函数给简写了[0403]
  10. Render树、RenderObject与RenderLayer