repo.or.cz
/
kudsource.git
/
blob
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
log
|
graphiclog1
|
graphiclog2
|
commit
|
commitdiff
|
tree
|
refs
|
edit
|
fork
blame
|
history
|
raw
|
HEAD
link/cut tree
[kudsource.git]
/
POJ
/
2840.cc
blob
0f1dc274e0ea5587e1ba2fde66fc2ceb19b14f25
1
#include <cstdio>
2
3
using namespace
std
;
4
5
int
main
()
6
{
7
int
tcase
;
8
scanf
(
"%d"
,&
tcase
);
9
while
(
tcase
--)
10
{
11
int
a
,
b
;
12
scanf
(
"%d:%d"
,&
a
,&
b
);
13
if
(
b
>
0
)
puts
(
"0"
);
else
14
if
(
a
==
12
)
puts
(
"24"
);
else
15
printf
(
"%d
\n
"
,(
a
+
12
)%
24
);
16
}
17
return
0
;
18
}