题解 | #牛牛的时钟#
牛牛的时钟
https://www.nowcoder.com/practice/36fd5f6b6236452f99f0ea59cd3447e0
#include <csetjmp>
#include <iostream>
using namespace std;
int main() {
int time = 0, num = 0;
cin >> num;
int s = 0, m =0 , h =0;
for( int i = 0 ; i < num ; i++){
cin >> time;
s+= time;
while(s >= 60) {
s-=60;
m++;
}
while(m >= 60) {
m-=60;
h++;
}
while(h >= 24) {
h-=24;
}
cout << h << " " << m << " " << s << endl;
}
return 0;
}


