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 2828 at 2009-05-24 23:23:57 on Problem 3589
#include"stdio.h"
int main()
{
	int n,i,j;
	char s[10],b[10];
	scanf("%d",&n);
	while(n--)
	{
		int A=0,B=0;
		scanf("%s%s",s,b);
		for(i=0;i<4;i++)
			for(j=0;j<4;j++)
				if(s[i]==b[j])
				{
					B++;
					if(i==j)
						A++;
				}
		printf("%dA%dB\n",A,B-A);
	}return 0;
}

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