萌新,30分,求求大佬指点
查看原帖
萌新,30分,求求大佬指点
868943
B22040101楼主2023/4/26 19:56
#include<bits/stdc++.h>
using namespace std;
int main(){
    int HH=7,MM=50;
    double s,v,tem;
    cin>>s>>v;
    tem=(int)s/v;
    if(tem<s/v){
        tem++;
    }
    MM-=tem;
    while(MM<0){
        HH--;
        MM+=60;
        if(MM<0){
            MM=23;
        }
    }
    cout<<setw(2)<<setfill('0')<<HH<<':'<<setw(2)<<setfill('0')<<MM;
    return 0;
}
2023/4/26 19:56
加载中...