作业帮 > 综合 > 作业

C语言题目“CD Making”我编出来了,但在网页上提交时总提示wrong answer,求大神帮忙检查下哪里错了

来源:学生作业帮 编辑:作业帮 分类:综合作业 时间:2024/05/13 08:34:29
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
k=15,n=13 这个数据你考虑一下