【深基2.例12】上学迟到
写的时候看过了其他人的题解
#include <stdio.h>
#include<string.h>
int main()
{
int t = 470, s, v;
scanf("%d %d", &s, &v);
t = t - s / v;
if (s % v != 0) {
t--;
}
if (s / v > t) {
t += 24 * 60;
}
if (t / 60 == 24) {
printf("00:00");
}
else {
printf("%02d:%02d", t / 60, t % 60);
}
return 0;
}