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> #include <string.h> int main() { char str1[20],str2[20]; int i,j,length1,length2,total; scanf("%s %s",str1,str2); length1=strlen(str1); length2=strlen(str2); total=0; for(i=0;i<length1;i++) { for(j=0;j<length2;j++) total+=(str1[i]-'0')*(str2[j]-'0'); } printf("%d\n",total); return 1; } Followed by: Post your reply here: |
All Rights Reserved 2003-2013 Ying Fuchen,Xu Pengcheng,Xie Di
Any problem, Please Contact Administrator