Julyed
来源:互联网 发布:淘宝的付费流量 编辑:程序博客网 时间:2024/06/06 09:15
Julyed
Time Limit: 2000MS Memory limit: 65536K
题目描述
Julyed is preparing for her CET-6. She has N words to remember, but there is only M days left. If she can’t remember all these words, she won’t pass CET-6. If she can’t pass CET-6, she will be unhappy. But if she remember too many words in one day, she will be unhappy, too. If she is unhappy, tomriddly will be unhappy. So she will remember as little words as she can in one day. For the happiness of both tomriddly and Julyed, how many words at most will Julyed remember in one day?
输入
Multiple test cases. The first line is an integer T (T <= 10000), indicating the number of test cases.
Each test case is a line with two integers N, M (1 <= N, M <= 200), indicating the number of words to remember and the number of days left.
输出
One line per case, an integer indicates the answer.
示例输入
56 32 11 25 24 3
示例输出
22132
提示
第一个题------签到题目(“浪潮杯”山东省第七届ACM大学生程序设计竞赛)
#include <bits/stdc++.h>using namespace std;int main(){ int t; cin>>t; int x; while(t--){ int n, m; cin >> n >> m; if(n <= m){ cout << 1 << endl;; }else { x = n/m; if(x*m == n){ cout << x << endl; }else { cout << x+1 << endl; } } } return 0;}
0 0
- Julyed
- 第七届ACM山东省赛-A Julyed
- 山东省第7届省赛 A题 Julyed
- 山东省第七届ACM省赛------Julyed
- 哈理工OJ 2304 Julyed(水题)
- 第七届山东省ACM省赛 A Julyed
- 山东省第七届ACM大学生程序设计竞赛 A Julyed
- bzoj 2989&&4170: 数列
- HAILSTONE
- R小波分解
- C++11多线程之yield
- 如何把 Word 中的表格快速插入 LaTeX?
- Julyed
- R参考卡片二
- 如何通过Retrofit提交Json格式数据
- 实习杂记(21):LocalBroadcastManager的使用、优点在哪里?
- leetcode---Unique Paths---动规
- configure: error: Cannot find OpenSSL's <evp.h>
- POJ_1502_MPI Maelstrom_最短路径
- JavaScript如何处理错误
- [Java]BufferedOutputStream、DataInputStream源码分析