?? 1503.c
字號:
Source Code
Problem: 1503 User: birdman
Memory: 80K Time: 0MS
Language: C Result: Accepted
Source Code
#include<stdio.h>
#include<string.h>
int main()
{
char a[110];
int i,j,m;
static int res[110];
while(gets(a),strcmp(a,"0"))
{
m=strlen(a);
for(i=109,j=m-1;j>=0;i--,j--)
{
res[i]+=a[j]-'0';
res[i-1]+=res[i]/10;
res[i]%=10;
}
}
for(i=j=0;i<110;i++)
if(res[j]||res[i])
printf("%d",res[i]);
else
j++;
putchar('\n');
return 0;
}
?? 快捷鍵說明
復制代碼
Ctrl + C
搜索代碼
Ctrl + F
全屏模式
F11
切換主題
Ctrl + Shift + D
顯示快捷鍵
?
增大字號
Ctrl + =
減小字號
Ctrl + -