0
1
mirror of https://git.sb/baoshuo/OI-codes.git synced 2024-11-10 07:38:49 +00:00

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

R39747907
This commit is contained in:
Baoshuo Ren 2020-10-13 19:00:30 +08:00 committed by Baoshuo Ren
parent 2a952a8412
commit 754fbce109
Signed by: baoshuo
GPG Key ID: 70F90A673FB1AB68

23
problem/P5707/P5707.cpp Normal file
View File

@ -0,0 +1,23 @@
#include <bits/stdc++.h>
using namespace std;
int main() {
int s, v, m, h;
scanf("%d%d", &s, &v);
m = s / v;
if(s%v != 0) {
m++;
}
m += 10;
h = m / 60;
m %= 60;
if (h > 7) {
printf("%02d", 24 + 7 - h);
}
else {
printf("%02d", 7 - h);
}
printf(":%02d\n", 60 - m);
return 0;
}