90分求助
查看原帖
90分求助
1558652
yanshuai666楼主2024/11/9 15:43
#include <bits/stdc++.h>
using namespace std;
const int N = 101001;

int main()
{
    double s, v;
    cin >> s >> v;
    int t = 10;
    t += ceil(s / v); // 向上取整
    int num = ceil((double)t / 60);
    int HH = 8, MM = (60 - t % 60) % 60;
    HH = 8 - num;
    if (HH <= 0)
        HH = 24 - (num - 8);
    if (HH < 10 && HH > 0)
        cout << "0";
    cout << HH << ":";
    if (MM < 10)
        cout << "0";
    cout << MM;

    return 0;
}

2024/11/9 15:43
加载中...