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.

示例输入

5
6 3
2 1
1 2
5 2
4 3

示例输出

2
2
1
3
2

来源

 “浪潮杯”山东省第七届ACM大学生程序设计竞赛

题意:

N组测试数据,每一个测试数据包含两个数字,代表单词总数和每天最多记忆的单词,问他最少多少天可以记完所有的单词~
省赛中最水的一道题~o(╯□╰)o

AC代码:
#include<stdio.h>
#include<math.h>
int main()
{
    int N;
    scanf("%d",&N);
    while(N--)
    {
        int a,b;
        scanf("%d%d",&a,&b);
        int s=ceil((double)a/b);
        printf("%d\n",s);
    }
}


山东省第七届ACM省赛------Julyed的更多相关文章

  1. 山东省第七届ACM省赛------Memory Leak

    Memory Leak Time Limit: 2000MS Memory limit: 131072K 题目描述 Memory Leak is a well-known kind of bug in ...

  2. 山东省第七届ACM省赛------Reversed Words

    Reversed Words Time Limit: 2000MS Memory limit: 131072K 题目描述 Some aliens are learning English. They ...

  3. 山东省第七届ACM省赛------Triple Nim

    Triple Nim Time Limit: 2000MS Memory limit: 65536K 题目描述 Alice and Bob are always playing all kinds o ...

  4. 山东省第七届ACM省赛------The Binding of Isaac

    The Binding of Isaac Time Limit: 2000MS Memory limit: 65536K 题目描述 Ok, now I will introduce this game ...

  5. 山东省第七届ACM省赛------Fibonacci

    Fibonacci Time Limit: 2000MS Memory limit: 131072K 题目描述 Fibonacci numbers are well-known as follow: ...

  6. 山东省第七届ACM省赛

    ID Title Hint A Julyed 无 B Fibonacci 打表 C Proxy 最短路径 D Swiss-system tournament 归并排序 E The Binding of ...

  7. 山东省第十届ACM省赛参赛后的学期总结

    5.11,5.12两天的济南之旅结束了,我也参加了人生中第一次正式的acm比赛,虽然是以友情队的身份,但是我依旧十分兴奋. 其实一直想写博客来增加自己的能力的,但是一直拖到现在,正赶上老师要求写一份总 ...

  8. Rectangles(第七届ACM省赛原题+最长上升子序列)

    题目链接: http://acm.nyist.edu.cn/JudgeOnline/problem.php?pid=1255 描述 Given N (4 <= N <= 100)  rec ...

  9. 山东理工大学第七届ACM校赛-LCM的个数 分类: 比赛 2015-06-26 10:37 18人阅读 评论(0) 收藏

    LCM的个数 Time Limit: 1000ms   Memory limit: 65536K  有疑问?点这里^_^ 题目描述 对于我们来说求两个数的LCM(最小公倍数)是很容易的事,现在我遇到了 ...

随机推荐

  1. 自定义组件-支持PNG图片的多态GraphicButton

    按钮功能使用TButton也可以解决, 但是TButton是会获得焦点的, 很多时候我们要求按钮不获得焦点, 而Speedbutton又不支持PNG图片 所以按照TSpeedbutton的代码, 重新 ...

  2. SpringMVC常用配置-处理程序异常以及404错误

  3. Ionic- Android 开发环境搭建

    Ionic- Android 开发环境搭建 为时一周的IONIC ADNROID 环境终于在各种处理错误中搭建成功,以下记录下搭建过程中遇到的各种情况的处理办法. 一 首先,当然是enviroment ...

  4. centos7作为web服务器优化

    centos7作为web服务器优化 原文 http://itindex.net/detail/51140-centos7-web-服务器 1.加大打开文件数的限制(open files) 查看 uli ...

  5. GPS部标平台的架构设计(九)-GPS监控客户端设计

    交通部的部标过检,所有的测试都是从客户端发起的,也是在客户端体现的,在客户端承载了部标标准所要求的所有的功能,是整个部标平台当中工作量最大的部分,也是最繁琐的部分. 客户端设计面临两个问题: 1.基于 ...

  6. Computop支付网关(一) credit Card

    1.界面没有中文,只能选择英文 sp – Spanish; en – English; ca – Catalan; fr – French; de – German; du – Dutch; it – ...

  7. jsp作为服务端,ajax请求回应

    刚学ajax,想以jsp作为服务端,来回应ajax的请求: 代码如下: <!DOCTYPE html> <html> <head lang="en"& ...

  8. c语言二维数组求最大值

    #include<stdio.h> int main() { ,colum=,max; ][]={{,,,},{,,,},{-,,-,}}; max=a[][]; ;i<=;i++) ...

  9. 利用Python实现从百度下载图片到本地磁盘

    import urllib.request import os import re url=r'http://image.baidu.com/search/index?tn=baiduimage&am ...

  10. Javascript-9-1-OOP-5-链式调用

    <html lang="en"> <head> </head> <body> <div class="" ...