結果

問題 No.652 E869120 and TimeZone
ユーザー MoqAtMoqAt
提出日時 2018-03-02 13:16:21
言語 Python3
(3.12.2 + numpy 1.26.4 + scipy 1.12.0)
結果
WA  
実行時間 -
コード長 606 bytes
コンパイル時間 150 ms
コンパイル使用メモリ 10,892 KB
実行使用メモリ 8,100 KB
最終ジャッジ日時 2023-08-30 21:33:18
合計ジャッジ時間 2,322 ms
ジャッジサーバーID
(参考情報)
judge13 / judge14
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 15 ms
8,052 KB
testcase_01 AC 16 ms
7,956 KB
testcase_02 WA -
testcase_03 AC 16 ms
7,876 KB
testcase_04 AC 16 ms
7,920 KB
testcase_05 AC 16 ms
7,960 KB
testcase_06 WA -
testcase_07 WA -
testcase_08 AC 16 ms
8,052 KB
testcase_09 AC 15 ms
7,864 KB
testcase_10 AC 16 ms
7,944 KB
testcase_11 AC 15 ms
7,860 KB
testcase_12 AC 15 ms
7,948 KB
testcase_13 WA -
testcase_14 AC 15 ms
7,860 KB
testcase_15 AC 16 ms
7,908 KB
testcase_16 WA -
testcase_17 WA -
testcase_18 AC 16 ms
7,940 KB
testcase_19 AC 16 ms
7,872 KB
testcase_20 AC 16 ms
7,920 KB
testcase_21 WA -
testcase_22 AC 15 ms
7,876 KB
testcase_23 AC 15 ms
7,872 KB
testcase_24 WA -
testcase_25 AC 15 ms
7,904 KB
testcase_26 AC 16 ms
8,040 KB
testcase_27 AC 16 ms
7,908 KB
testcase_28 AC 16 ms
8,008 KB
testcase_29 AC 16 ms
7,904 KB
testcase_30 AC 15 ms
7,968 KB
testcase_31 AC 15 ms
7,960 KB
testcase_32 AC 16 ms
7,860 KB
testcase_33 AC 16 ms
7,952 KB
testcase_34 AC 16 ms
8,052 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

# coding=utf-8

from math import modf


list = input().split()
hour = int(list[0])
minutes = int(list[1])
utc = str(list[2])

d = str(utc[3])
set = float(utc[3:])

diff = 9 - set
diff_m, diff_h = modf(diff)

hour = hour - int(diff_h)

minutes = minutes - int(diff_m * 60)

if minutes >= 60:
    minutes = minutes - 60
    hour += 1
elif minutes < 0:
    minutes = 60 + minutes
    hour -= 1


if hour > 24:
    hour = hour - 24
elif hour < 0:
    hour = 24 + hour

if hour < 10:
    hour = str('0' + str(hour))

if minutes < 10:
    minutes = str('0' + str(minutes))

print(str(hour) + ':' + str(minutes))
0