90分求助

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

okchild @ 2023-09-26 16:38:33

#include<stdio.h>
int main()
{
    int s,v;
    scanf("%d%d",&s,&v);
    int st=(24+8)*60;
    int t;

    if(s/v!=0)
    {
        t=11+s/v;
    }
    else
    {
        t=s/v+10;
    }

    int gt=st-t;

    if(t<8*60)
    {
        gt-=24*60;
    }

    int h=gt/60;
    int m=gt%60;

    printf("%02d:%02d",h,m);
    return 0;
}

|