| ||||||||||
| 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?求救大牛们#include<stdio.h>
main()
{
unsigned r,c;
scanf("R%uC%u",&r,&c);
getchar();
while(r||c)
{
int n=1,t=26*26;
while(t<c*25+26)t*=26,n++;
t=c-(t/26-26)/25-1;
char a[10];
for(int i=0;i<n;i++)a[i]=t%26+'A',t/=26;
for(int i=0;i<n/2;i++)
{
char x=a[i];
a[i]=a[n-1-i];
a[n-1-i]=x;
}
a[n]=0;
printf("%s%u\n",a,r);
scanf("R%uC%u",&r,&c);
getchar();
}
}
Followed by: Post your reply here: |
All Rights Reserved 2003-2013 Ying Fuchen,Xu Pengcheng,Xie Di
Any problem, Please Contact Administrator