#include <stdio.h> int main() { int n,m,a,b,c,d; scanf("%d%d",&n,&m); a=n%100; c=0; b=a+m; while(b>60&&b>0) {b=b-60; c++;} while(b<0) {b=b+60; c--;} d=n/100+c; if(d>24) d=d-24; printf("%d%02d",d,b); return 0; }
#include <stdio.h> int main() { int n,m,a,b,c,d; scanf("%d%d",&n,&m); a=n%100; c=0; b=a+m; while(b>60&&b>0) {b=b-60; c++;} while(b<0) {b=b+60; c--;} d=n/100+c; if(d>24) d=d-24; printf("%d%02d",d,b); return 0; }