#include <stdio.h>
int main() {
int h,m,time;
scanf("%d %d %d",&h,&m,&time);
h+=time/60;
m+=time%60;
if (m>=60) {
h+=1;
m-=60;
}
if (h>=24) {
h-=24;
}
printf("%d %d",h,m);
return 0;
}
To embed this project on your website, copy the following code and paste it into your website's HTML: