| ||||||||||
| Online Judge | Problem Set | Authors | Online Contests | User | ||||||
|---|---|---|---|---|---|---|---|---|---|---|
| Web Board Home Page F.A.Qs Statistical Charts | Current Contest Past Contests Scheduled Contests Award Contest | |||||||||
233333//============================================================================
// Name : main2840.cpp
// Author :
// Version :
// Copyright : Your copyright notice
// Description : Hello World in C++, Ansi-style
//============================================================================
#include <iostream>
#include <stdio.h>
#include <string.h>
using namespace std;
int main() {
int n;
scanf("%d", &n);
for(int ii = 0; ii < n; ii++){
char t[10];
scanf("%s", t);
int l = strlen(t);
int h = 0, m = h;
int i = 0;
while(t[i] != ':'){
h *= 10;
h += (t[i] - '0');
i++;
}
i++;
while(i < l){
m *= 10;
m += (t[i] - '0');
i++;
}
printf("%d\n", m ? 0 : (h+11)%24+1);
}
return 0;
}
Followed by: Post your reply here: |
All Rights Reserved 2003-2013 Ying Fuchen,Xu Pengcheng,Xie Di
Any problem, Please Contact Administrator