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

## Re:大家给看一下,哪个地方有问题啊,本地运行正确,一传就说 "Wrong number"???????

Posted by xhcbrave at 2005-03-26 20:51:56 on Problem 2005
In Reply To:大家给看一下,哪个地方有问题啊,本地运行正确,一传就说 "Wrong number"??????? Posted by:qqliuyong at 2005-03-19 21:44:04
```> #include "stdio.h"
>
> int value (char asc)
> {switch(asc)
> {case 65:case 97:return 11;
> 	case 74:case 106:
> 	case 75:case 107:
> 	case 81:case 113:
> 	case 84:case 116:
> 		return 10;
> 	default :return asc-48;
> 	}
> }
>
>
> int findxiao(int a1,int b1,int c1,int x,int n)
> {int c=0,num=0;
> 		if (a1<x)c++;
> 		if (b1<x)c++;
> 		if (c1<x)c++;
>
> 	if(x<=10)
> 		num=4*n*(x-2)-c;
>
>
> 	if(x==11)
> 		num=4*n*12-c;
> 	if(x>11)
> 		num=4*n*13-c;
> return num;
> }
>
>
>
>
> main()
> {int a1[30],a2[30],a3[30],n[30],v0,sum=0,i,j,d=0;
> for(i=0;i<30;i++)
> {scanf("%d",&n[i]);
> if(n[i]==0)break;
> scanf(" %c %c %c",&a1[i],&a2[i],&a3[i]);
> }
>
> for(j=0;j<i;j++)
> {
> if(value(a2[j])+value(a3[j])>21)sum=0;
> else
> {     v0=value(a2[j])+value(a3[j])-value(a1[j]);         //我方取胜的最高值
>
>
>
>
> sum=findxiao(value(a1[j]),value(a2[j]),value(a3[j]),v0,n[j]);
> if(v0<=2)sum=0;
>
> }
>
>
> if(d)printf("\n\n");
> printf("%.3f%%",(float)sum/(52*n[j]-3)*100);
> d++;
> }
>
> return 1;
>
> }
```

Followed by: