山东省第七届ACM大学生程序设计竞赛 A Julyed
2016-06-09 20:51
351 查看
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, shewill 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;
}
相关文章推荐
- zip tar
- 2076 Problem F Quick Brown Fox
- Web Server 在iis下部署php网站在iis下
- (HolisticLearning)试译加感想
- HDU 1812 Count the Tetris(Polya原理+高精度)
- httaccess笔记
- 一起talk C栗子吧(第一百六十三回:C语言实例--三目运算符)
- 丑数
- securecrt链接virtualbox
- 山东省第七届ACM大学生程序设计竞赛 E The Binding of Isaac
- [Nutch]Hadoop动态增加DataNode节点和TaskTracker节点
- c练习
- 初识C++继承
- leetcode 19. Remove Nth Node From End of List
- redsocks2 自动代理设置
- Visual Studio Code
- 卸载Ubuntu软件
- CSS---利用伪类绘制倒三角形
- Redis安装与配置
- RS232串口线接法与线芯引脚定义