#10过不去
查看原帖
#10过不去
845504
let6536楼主2023/3/23 00:24
#include<iostream>
#include<math.h>
using namespace std;
int main() {
    int s, v,t;
    int h,m,num;
    h = 7;
    m = 50;
    num = m + h * 60;
    cin >> s >> v;
    if(ceil(s/v!=0))
    t = ceil(s / v)+1;
    if (s % v == 0)
        t = s / v;
    int q = (num - t);
    if (q < 0)
        q += 24 * 60;
    h = q / 60;
    m = q %60;
    if (h < 10 && m < 10)
        cout << "0" << h << ":0" << m;
    if(h>10&&m<10)
        cout  << h << ":0" << m;
    if(h<10&&m>10)
        cout << "0" << h << ":" << m;
    if(h>10&&m>10)
    cout << h << ":" << m;
    return 0;
}

2023/3/23 00:24
加载中...