| ||||||||||
| 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 | |||||||||
这样也能过#include <stdio.h>
int main()
{
int i;
int N;
int a;
int x;
int k;
scanf("%d",&N);
while (N--)
{ k=0;
scanf("%d",&a);
while (a>10)
{
x=a%10;
a/=10;
k++;
if (x>=5)
a=a+1;
}
printf ("%d",a);
for (i=0;i<k;i++)
printf("0");
printf("\n");
}
return 0;
}
Followed by: Post your reply here: |
All Rights Reserved 2003-2013 Ying Fuchen,Xu Pengcheng,Xie Di
Any problem, Please Contact Administrator