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 other
来源:学生作业帮助网 编辑:六六作业网 时间:2024/11/16 03:39:04
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 other
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
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 other
题目要求输入的N的范围是 1