#include <stdio.h>
int main(void) {
int total_time = 12 * 60 * 60 * 1000;
int tanshin_speed = 1;
int choshin_speed = tanshin_speed * 12;
int byoshin_speed = choshin_speed * 60;
int tanshin_position = 0;
int choshin_position = 0;
int byoshin_position = 0;
while (tanshin_position < total_time) {
if (tanshin_position == choshin_position && tanshin_position == byoshin_position) {
printf("%02d:", tanshin_position
/ (60 * 60 * 1000)); printf("%02d:", choshin_position
/ (60 * 60 * 1000)); printf("%02d\n", byoshin_position
/ (60 * 60 * 1000)); }
tanshin_position += tanshin_speed;
choshin_position += choshin_speed;
choshin_position %= total_time;
byoshin_position += byoshin_speed;
byoshin_position %= total_time;
}
return 0;
}
I2luY2x1ZGUgPHN0ZGlvLmg+CgppbnQgbWFpbih2b2lkKSB7CgkKCWludCB0b3RhbF90aW1lID0gMTIgKiA2MCAqIDYwICogMTAwMDsKCQoJaW50IHRhbnNoaW5fc3BlZWQgPSAxOwoJaW50IGNob3NoaW5fc3BlZWQgPSB0YW5zaGluX3NwZWVkICogMTI7CglpbnQgYnlvc2hpbl9zcGVlZCA9IGNob3NoaW5fc3BlZWQgKiA2MDsKCQoJaW50IHRhbnNoaW5fcG9zaXRpb24gPSAwOwoJaW50IGNob3NoaW5fcG9zaXRpb24gPSAwOwoJaW50IGJ5b3NoaW5fcG9zaXRpb24gPSAwOwoJCgl3aGlsZSAodGFuc2hpbl9wb3NpdGlvbiA8IHRvdGFsX3RpbWUpIHsKCgkJaWYgKHRhbnNoaW5fcG9zaXRpb24gPT0gY2hvc2hpbl9wb3NpdGlvbiAmJiB0YW5zaGluX3Bvc2l0aW9uID09IGJ5b3NoaW5fcG9zaXRpb24pIHsKCQkJcHJpbnRmKCIlMDJkOiIsIHRhbnNoaW5fcG9zaXRpb24gLyAoNjAgKiA2MCAqIDEwMDApKTsKCQkJcHJpbnRmKCIlMDJkOiIsIGNob3NoaW5fcG9zaXRpb24gLyAoNjAgKiA2MCAqIDEwMDApKTsKCQkJcHJpbnRmKCIlMDJkXG4iL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