zoj1414
来源:互联网 发布:怎么优化宝贝标题贴吧 编辑:程序博客网 时间:2024/06/05 03:36
简单题
#include <iostream>using namespace std;int main(){ int num,x,y; cin >> num; while(num--) { cin >> x >> y; if(y%2 == 0) { if(y == x) cout << 2*y << endl; else if(y == x - 2) cout << 2*y + 2 << endl; else cout << "No Number" << endl; } else { if(y == x) cout << 2*y - 1 << endl; else if(y == x - 2) cout << 2*y + 1 << endl; else cout << "No Number" << endl; } } return 0;}
0 0
- ZOJ1414
- zoj1414
- zoj1414
- [水]ZOJ1414
- ZOJ1414 Number Steps
- ZOJ1414 Number Steps
- zoj1414 Number Steps
- ZOJ1414题的解法
- ZOJ1414 POJ1663 Number Steps 很简单的找规律题
- LeetCode(55) Jump Game
- 关于怎么向Xcode6 IOS8之后向项目中添加预编译文件
- mysql 服务1067 坑爹的错误
- zoj1405
- HDU 2138 How many prime numbers
- zoj1414
- OC_NSString
- MATLAB图像函数 块和邻域的处理
- Opencv— — kaleidoscope Filter
- zoj1494
- 重载一元、二元运算符
- 初学php做的有关php有关知识的了解
- 英语学习--chap15 对等连接词与对等从句
- 【HTML学习】第四章 更丰富的内容标记方法