lililala2332 @ 2024-02-06 22:38:52
#include <stdio.h>
#include <string.h>
#include <math.h>
int main()
{
int s , v;
scanf("%d %d,",&s,&v);
int time = 480 - ( ceil(s*1.0/v) + 10 );
int hour = time/60 , minute = time - 60*hour;
printf("0%d:%.2d",hour,minute);
return 0;
}
by mengxin_xiao_cai @ 2024-02-10 16:32:41
输出不一定前面带0,比如他是前一天23;40出发的呢?后面不一定没有0,比如他是06:3出发的呢,那是不是要改成06:03。可以看看我帖子,也是c语言的