求大佬告诉我哪错了
查看原帖
求大佬告诉我哪错了
1643406
shenliyan楼主2025/1/19 19:37
#include <iostream>
#include <iomanip>
using namespace std;
int main() {
    int s, v;
    cin >> s >> v;
    int time_to_school = s / v + (s % v ? 1 : 0);
    int latest_time = 480 - time_to_school - 10;
    int hours = latest_time / 60;
    int minutes = latest_time % 60;
    cout << setfill('0') << setw(2) << hours << ":" << setw(2) << minutes << endl;
    return 0;
}
2025/1/19 19:37
加载中...