70分求调!!!

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

FYH666666 @ 2024-02-06 22:23:39

#include<stdio.h>
int main(){
    int s;
    int v;
    scanf("%d%d",&s,&v);
    int time=s/v+10;
    int shi=time/60;
    int fen=time%60+1;
    int p,q;
    if(fen>0){
        p=8-shi-1;
        q=60-fen;
    } 
    else{
        p=8-shi;
        q=0;
    }
    if(q<10) printf("0%d:0%d",p,q);
    else printf("0%d:%d",p,q);
    return 0;
}

|