Online JudgeProblem SetAuthorsOnline ContestsUser
Web Board
Home Page
F.A.Qs
Statistical Charts
Problems
Submit Problem
Online Status
Prob.ID:
Register
Update your info
Authors ranklist
Current Contest
Past Contests
Scheduled Contests
Award Contest
User ID:
Password:
  Register

水好深啊!我摸不着头脑了!附代码!

Posted by chenxuan123456789 at 2012-08-07 15:43:32 on Problem 3673
#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:
User ID:
Password:
Title:

Content:

Home Page   Go Back  To top


All Rights Reserved 2003-2013 Ying Fuchen,Xu Pengcheng,Xie Di
Any problem, Please Contact Administrator