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

没想法了 只要分钟不为0,就要输出0

Posted by 456364910 at 2011-07-26 14:30:01 on Problem 2840
附代码
#include<stdio.h>
int main()
{
	int n;
	scanf("%d",&n);
	while(n--)
	{
		int a,b;
		scanf("%d:%d",&a,&b);
		if (b)
		{
			printf("0\n");
			continue;
		}
		if(a>12&&a<24)
			printf("%d\n",a-12);
		else if(a>=0&&a<=12)
			printf("%d\n",a+12);
	}
	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