| ||||||||||
| 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>
#include <string.h>
int main()
{
char n1[20 + 1], n2[20 + 1];
int s;
int i, j;
scanf("%s%s", n1, n2);
for(i = 0; i < strlen(n1); ++i)
{
n1[i] -= '0';
}
for(i = 0; i < strlen(n2); ++i)
{
n2[i] -= '0';
}
s = 0;
for(i = 0; i < strlen(n1); ++i)
{
for(j = 0; j < strlen(n2); ++j)
{
s += n1[i] * n2[j];
}
}
printf("%d\n", s);
return 0;
}
这个错哪儿了 = =||
希望牛人指点下
Followed by: Post your reply here: |
All Rights Reserved 2003-2013 Ying Fuchen,Xu Pengcheng,Xie Di
Any problem, Please Contact Administrator