From 754fbce109188b91f9ed615d33ad6b8f184aef58 Mon Sep 17 00:00:00 2001 From: Ren Baoshuo Date: Tue, 13 Oct 2020 19:00:30 +0800 Subject: [PATCH] =?UTF-8?q?P5707=20=E3=80=90=E6=B7=B1=E5=9F=BA2.=E4=BE=8B1?= =?UTF-8?q?2=E3=80=91=E4=B8=8A=E5=AD=A6=E8=BF=9F=E5=88=B0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit R39747907 --- problem/P5707/P5707.cpp | 23 +++++++++++++++++++++++ 1 file changed, 23 insertions(+) create mode 100644 problem/P5707/P5707.cpp diff --git a/problem/P5707/P5707.cpp b/problem/P5707/P5707.cpp new file mode 100644 index 00000000..f6d41ce4 --- /dev/null +++ b/problem/P5707/P5707.cpp @@ -0,0 +1,23 @@ +#include + +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; +}