| ||||||||||
| 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 | |||||||||
这个进位的时候从前往后扫和从后往前扫不是一样的吗?为啥从前往后就是WA????????????????for(i=n-1;i>=0;i--)
if(a[i]> '9' && i)
{
a[i]-=10;
a[i-1] += 1;
}
a[n] = '\0';
for(i = 0; i < n; i ++)
if(a[i]> '9' && i)
{
a[i]-=10;
a[i-1] += 1;
}
a[n] = '\0';
Followed by: Post your reply here: |
All Rights Reserved 2003-2013 Ying Fuchen,Xu Pengcheng,Xie Di
Any problem, Please Contact Administrator