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

你的m*n计算了3次,其实计算一次就可以了。

Posted by 042363 at 2006-07-05 10:17:48 on Problem 1450
In Reply To::)一次过,大家看看还能优化吗? Posted by:Manio at 2006-02-21 17:36:49
> main()
> {
> int total;
> int m,n;
> int i;
> 
> scanf("%d",&total);
> 
> for(i=1; i <= total ; i++)
> {
>  scanf("%d%d",&m,&n);
>  printf("Scenario #%d:\n",i);
〉 m=m*n;
>  if( (m)%2 == 0)
>   printf("%d.00\n",m);
>  else
>   printf("%d.41\n",m);
>  printf("\n");
> }/*for*/
> 
> }
>  
> 48K 15MS
 

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