山东省第七届ACM大学生程序设计竞赛 A Julyed
来源:互联网 发布:仿斗鱼直播源码 编辑:程序博客网 时间:2024/04/28 10:40
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
提示
水题
#include<stdio.h>#include<stdlib.h>
#include<string.h>
int main()
{
int n;
scanf("%d",&n);
while(n--)
{
int a,b,c;
scanf("%d%d",&a,&b);
c=a/b;
if(a%b!=0)c++;
printf("%d\n",c);
}
return 0;
}
0 0
- 山东省第七届ACM大学生程序设计竞赛 A Julyed
- 山东省第七届ACM大学生程序设计竞赛
- 第七届 山东省ACM大学生程序设计竞赛
- 第七届ACM山东省赛-A Julyed
- 第七届山东省ACM省赛 A Julyed
- 山东省第七届ACM大学生程序设计竞赛 B Fibonacci
- 山东省第七届ACM大学生程序设计竞赛 总结
- 山东省第七届ACM大学生程序设计竞赛-Fibonacci
- 山东省第七届ACM大学生程序设计竞赛-Reversed Words
- 山东省第七届ACM大学生程序设计竞赛Triple Nim
- 山东省第七届ACM大学生程序设计竞赛 字符串倒置
- 山东省第七届ACM大学生程序设计竞赛 C:Proxy
- 山东省第三届ACM大学生程序设计竞赛 n a^o7 !
- 山东省第七届ACM省赛------Julyed
- 第四届 山东省ACM大学生程序设计竞赛
- 山东省第七届ACM程序设计竞赛
- 山东省第七届ACM大学生程序设计竞赛 E The Binding of Isaac
- 山东省第七届ACM大学生程序设计竞赛 K —Reversed Words
- (HolisticLearning)试译加感想
- 类的加载顺序
- 一起talk C栗子吧(第一百六十三回:C语言实例--三目运算符)
- 获取View类界面控件的位置
- zip tar
- 山东省第七届ACM大学生程序设计竞赛 A Julyed
- APP设计欣赏发布
- 元素水平垂直居中
- java多线程HTTP服务器
- Contains Duplicate III
- 山东省第七届ACM大学生程序设计竞赛 K —Reversed Words
- 图解Android View的scrollTo(),scrollBy(),getScrollX(), getScrollY()
- Hibernate总结
- 计算机中的原码、反码、补码(上)