poj2840

简单题

View Code
#include <iostream>
#include
<cstdio>
#include
<cstdlib>
#include
<cstring>
using namespace std;

int main()
{
//freopen("t.txt", "r", stdin);
int t;
scanf(
"%d", &t);
while (t--)
{
int h, m;
scanf(
"%d:%d", &h, &m);
if (m)
printf(
"0\n");
else
printf(
"%d\n", (h + 36 - 1) % 24 + 1);
}
return 0;
}

原文地址:https://www.cnblogs.com/rainydays/p/2101612.html