作业帮 > 英语 > 作业

acm的题 总是出错 请高手帮我看一看错在哪里

来源:学生作业帮 编辑:拍题作业网作业帮 分类:英语作业 时间:2024/05/04 03:07:45
acm的题 总是出错 请高手帮我看一看错在哪里
A class went to a school trip.And,as usually,all N kids have got their backpacks stuffed with candy.But soon quarrels started all over the place,as some of the kids had more apples than others.Soon,the teacher realized that he has to step in:"Everybody,listen!Put all the apples you have on this table here!"
Soon,there was quite a large heap of apples on the teacher's table."Now,I will divide the apples into N equal heaps and everyone will get one of them." announced the teacher."Wait,is this really possible?" wondered some of the smarter kids.
You are given the number of apples each child brought.Find out whether the teacher can divide the apples into N exactly equal heaps.(For the purpose of this task,all apples are of the same type.)
Input
The first line of the input file contains an integer T specifying the number of test cases.Each test case is preceded by a blank line.
Each test case looks as follows:The first line contains N(1
题目要求输入的N的范围是 1
再问: 那条语句应该没有问题啊,当N不在此范围内的时候跳出不是合理的吗? 帮忙再看一下吧,卡了很长时间了。输入和输出和题目给的一样 就是提交之后报Abnormal Termination。
再答: 晕。题目要求是1