| ||||||||||
| Online Judge | Problem Set | Authors | Online Contests | User | ||||||
|---|---|---|---|---|---|---|---|---|---|---|
| Web Board Home Page F.A.Qs Statistical Charts | Current Contest Past Contests Scheduled Contests Award Contest | |||||||||
1019 为什么是wrong answer??#include<stdio.h>
void main()
{
int n,m,i;
scanf("%d",&n);
while(n--)
{
scanf("%d",&m);
for(i=1;;i++)
{
if(m<=i) {printf("%d\n",m);break;}
m=m-i;
}
}
}
Followed by: Post your reply here: |
All Rights Reserved 2003-2013 Ying Fuchen,Xu Pengcheng,Xie Di
Any problem, Please Contact Administrator