GrFL @ 2024-10-04 07:59:37
#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;
}