90分求助 9测试点

P5707 【深基2.例12】上学迟到

你...编译都没过
by 正义的魔鬼 @ 2022-07-31 10:54:37


定义一下T @[Nomster](/user/759320)
by 正义的魔鬼 @ 2022-07-31 10:56:25


谢了 复制成之前的代码``` ``` #include <iostream> #include <cmath> using namespace std; int main() { int s,v; cin >> s >> v; int T; if(s % v == 0)T = s / v + 9; else T = s / v + 10; int H= T / 60; int M = T - 60 * H; int h= 8 - H - 1; int m= ceil(60 - M - 1); if(h < 0)h += 24; if(h <= 9 && m <= 9)cout <<"0"<< h << ":"<<"0" <<m; if(h <= 9 && m > 9)cout <<"0"<< h << ":"<<m; if(h > 9 && m <= 9)cout << h << ":"<<"0"<<m; if(h > 9 && m > 9)cout << h << ":"<<m; return 0; } ```
by Nomster @ 2022-07-31 11:08:56


|