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

没说完,用C交就是WA

Posted by Rpmes at 2006-04-15 23:08:51
In Reply To:小菜鸟弱弱的向大牛们请教一下,为什么这个程序用GCC交就是AC,是不是我的编程习惯有些问题啊? Posted by:Rpmes at 2006-04-15 23:08:02
> /*
> 1155534 Rpmes 2815 Accepted 40K 0MS GCC 0.42K 2006-04-15 23:06:51.0 
> 1155533 Rpmes 2815 Wrong Answer   C 0.42K 2006-04-15 23:06:41.0 
> */
> 
> //PKU2815.c
> #include <stdio.h>
> 
> int main()
> {
> 	int A, HH, MM, SS, Sec;
> 	double round, T;
> 	
> 	round = 3600 * 12 / 11.0;
> 
> 	while (scanf("%d %d:%d:%d", &A, &HH, &MM, &SS) != -1 && A != -1)
> 	{
> 		Sec = HH * 3600 + MM * 60 + SS;
> 		T = round * A / 360;
> 		while (T < Sec)
> 		{
> 			T += round;
> 		}
> 		Sec = (int)T;
> 		Sec %= 86400;
> 		printf("%02d:%02d:%02d\n", Sec / 3600, Sec % 3600 / 60, Sec % 60);
> 	}
> 	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