#include <stdio.h>
int main()
{
int H, M, T;
scanf("%d", &T);
while (T --)
{
scanf("%d:%d", &H, &M);
int revH, revM;
if (H >= 12) H -= 12;
if (H == 12 && M == 0 || H == 0 && M == 0) puts("12:00");
else
{
revH = (12 - H) - 1;
revM = 60 - M;
if (revM == 60) revM = 0, revH ++;
if (revH == 0) revH = 12;
printf("%02d:%02d\n", revH, revM);
}
}
return 0;
}
回目錄
回首頁
沒有留言 :
張貼留言