GrFL @ 2024-10-02 09:12:07
#include <stdio.h>
int main(void)
{
int s, v, t;
scanf("%d%d", &s, &v);
t = s/v + 10;
if (s%v != 0)
{
t++;
}
int m1 = 480;
if (t <= m1)
{
printf("0%d:", (m1 - t) / 60);
if ( (m1 - t) % 60 >= 0 && (m1 - t) % 60 < 10)
printf("0%d", (m1 - t) % 60 );
else
printf("%d", (m1 - t) % 60 );
}
else if (t > m1)
{
if (t <= 1320)
{
printf("%d:", 24 - ((t - m1) / 60) - 1);
if ( (t - m1) % 60 >= 0 && (t - m1) % 60 < 10)
printf("%d", 60 - (t - m1) % 60 );
else
printf("0%d", 60 - (t - m1) % 60 );
}
else if (t > 1320 && t <= 1440)
{
printf("0%d:", 24 - ((t - m1) / 60) - 1 );
if ( (t - m1) % 60 >= 0 && (t - m1) % 60 < 10)
printf("%d", 60 - (t - m1) % 60 );
else
printf("0%d", 60 - (t - m1) % 60 );
}
}
return 0;
}
by Dawn99 @ 2024-10-02 16:24:29
1320?
by GrFL @ 2024-10-02 18:29:02
@Dawn99 嗯嗯 就是 前一天早上10点到晚上12点