每次分数都不一样???
查看原帖
每次分数都不一样???
811017
zhuangshanjbin楼主2022/11/16 16:26
#include<bits/stdc++.h>
using namespace std;
int main()
{
    int s,v,xs,fz,hh,mm,time;
    cin>>s>>v;
    if(time%v!=0)
        time=s/v+11;
    else
        time=s/v+10;
    xs=time/60;
    fz=time%60;
    if(xs<8)
    {
        if(fz==0)
        {
            hh=8-xs;
            mm=fz;
        }
        else
            hh=8-xs-1;
            mm=60-fz;
    }
    else if(xs>=8)
    {
        if(fz==0)
        {
            hh=32-xs;
            mm=60-fz;
        }
        else
            hh=32-xs-1;
            mm=60-fz;
    }
    if(hh<10)
        cout<<'0'<<hh<<':';
    else
        cout<<hh<<':';
    if(mm<10)
        cout<<'0'<<mm;
    else
        cout<<mm;
}
2022/11/16 16:26
加载中...