求助大佬!全是WA!

P5707 【深基2.例12】上学迟到

Lindafish @ 2023-11-24 08:20:30

#include <stdio.h>

int main()
{
    int s,v;
    scanf("%d %d",&s,&v);
    int i=1;
    while ( i<(s/v) ){
        i++;
    }
    int minute;
    minute=i+10;
    int time1,time2;
    int hour;
    if (minute>60){
        hour=minute/60;
        minute=minute%60;
        time2=60-minute;
        if (hour<=8){
            time1=8-hour;
            if (minute<10){
                printf("0%d:0%d",time1,time2);
            }else{
                printf("0%d:%d",time1,time2);
            }
        }else{
            time1=32-hour;
            if (minute<10){
                printf("%d:0%d",time1,time2);
            }else{
                printf("%d:%d",time1,time2);
            }            
        }
    }else{
        time1=7;
        time2=60-minute;
        if (minute<10){
            printf("0%d:0%d",time1,minute);
        }else{
            printf("0%d:%d",time1,minute);
        }         
    }

    return 0;
}
实在有点不知道该怎么改了。。。

|