C语言题目“CD Making”我编出来了,但在网页上提交时总提示wrong answer,求大神帮忙检查下哪里错了Tom has N songs and he would like to record them into CDs.A single CD can contain at most K songs.In addition,Tom is very su

来源:学生作业帮助网 编辑:作业帮 时间:2024/05/03 21:03:55
C语言题目“CD Making”我编出来了,但在网页上提交时总提示wrong answer,求大神帮忙检查下哪里错了Tom has N songs and he would like to record them into CDs.A single CD can contain at most K songs.In addition,Tom is very su

C语言题目“CD Making”我编出来了,但在网页上提交时总提示wrong answer,求大神帮忙检查下哪里错了Tom has N songs and he would like to record them into CDs.A single CD can contain at most K songs.In addition,Tom is very su
C语言题目“CD Making”我编出来了,但在网页上提交时总提示wrong answer,求大神帮忙检查下哪里错了
Tom has N songs and he would like to record them into CDs.A single CD can contain at most K songs.In addition,Tom is very superstitious and he believes the number '13' would bring bad luck,so he will never let a CD contain exactly 13 songs.Tom wants to use as few CDs as possible to record all these songs.Please help him.
There are T test cases.The first line gives T,number of test cases.T lines follow,each contains N and K,number of songs Tom wants to record into CDs,and the maximum number of songs a single CD can contain.
1 ≤ N ≤ 1000,1 ≤ K ≤ 1000
For each test case,output the minimum number of CDs required,if the above constraints are satisfied.
Sample Input
2
5 2
13 13
Sample Output
3
2
#include
#include
int main()
{
int T,N,K,n;
scanf("%d",&T);
for(;T>0;T--)
{
scanf("%d%d",&N,&K);
if(K

C语言题目“CD Making”我编出来了,但在网页上提交时总提示wrong answer,求大神帮忙检查下哪里错了Tom has N songs and he would like to record them into CDs.A single CD can contain at most K songs.In addition,Tom is very su
k=15,n=13 这个数据你考虑一下

C语言题目“CD Making”我编出来了,但在网页上提交时总提示wrong answer,求大神帮忙检查下哪里错了Tom has N songs and he would like to record them into CDs.A single CD can contain at most K songs.In addition,Tom is very su 牛顿的插值法用C语言怎么编写怎么编啊?这是数值分析的一个内容,如果你还知道拉格朗日的插值用C语言怎么编的话,也可以拿出来分享一下,我用C语言编了一个拉格朗日的插值法,如果你想要 请教C语言的二元二次方程解法,哪位达人能提供C语言解二元二次方程的解法,这都被你看出来了 现在不用那种方法了 不好 楼下那位编出来了我给你两倍的分 呵呵 一道C语言题目 有3个整数a,b,c,由键盘输入,输出其中最大的数,请编写程序.我编的是这样的,但是老师要求IF嵌套语句表示出来 # includeint main (void){ float a,b,c,t;printf(请输入三个任意整数: );scan C语言 怎么求出一个多位数 每位的数字?最好能够编出来~ C语言 我算不出来 c语言编程,为什么我编出来的程序显示Process terminated with status 0 (0 minutes, 0 seconds)题目如下,某航空公司飞机飞行费用分为燃油费(每一千米用12升油,每升油1.2元),还有额外的60000元固定费用, 用C语言编写杨辉三角形有谁 能编,就尽量的显示出来吧!1我在这里先谢了!我想知道了是,等腰三角形呀!你们能把图形一起写出来不? C语言运算题目 C语言题目选择 C语言改错题目 哪位高手帮我用c语言编一个计算圆的周长和面积 谁帮我用C语言编一个程序求任意圆的面积? 谁能帮我编一个C语言程序?任意输入两个整数,输出它们的最大公约数 我学的c语言,编了一个程序号出现了这些英文, 用梯形法编程求函数f(x)=x2+2x+1的定积分 求大神帮我把这个题有c语言或c++编出来,急用, 帮我做这道C语言题目第34题 C语言题目,求高手解答我需要正确答案 谢谢