显然考察%和/
代码如下(C)
#include<stdio.h>
#define maxsize 1000
struct timea
{
int h;
int m;
};
void funa(struct timea a[], int n) {
for (int i = 0; i < n; i++) {
scanf("%d:%d", &a[i].h, &a[i].m);
}
for (int i = 0; i < n; i++) {
int m1 = (15 + a[i].m) % 60;
int h1 = 13 + a[i].h + (15 + a[i].m) / 60;
printf("%d:%d\n", h1%24, m1);
}
}
int main()
{
struct timea a[maxsize];
int n;
scanf("%d", &n);
funa(a, n);
return 0;
}
完美AC