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

史上最大杯具,打错数字造成WA -_-

Posted by 456852456852 at 2010-04-06 23:16:58 on Problem 2840
菜菜鸟:
#include <iostream>
using namespace std;
int main()
{
 int h,m,t,stk;
 char rest;
 cin>>t;
 while(t--)
 {
  cin>>h>>rest>>m;
  if(m)
  stk=0;
  else
  stk=h+12;
  cout<<(stk>24?(stk-24):stk)<<endl;
 }
return 0;
}
//AC

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