結果

問題 No.652 E869120 and TimeZone
ユーザー nebukuro09nebukuro09
提出日時 2018-02-23 22:42:31
言語 Python2
(2.7.18)
結果
WA  
実行時間 -
コード長 371 bytes
コンパイル時間 60 ms
コンパイル使用メモリ 6,708 KB
実行使用メモリ 7,864 KB
最終ジャッジ日時 2023-08-22 14:12:45
合計ジャッジ時間 2,039 ms
ジャッジサーバーID
(参考情報)
judge15 / judge11
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 22 ms
7,636 KB
testcase_01 AC 23 ms
7,660 KB
testcase_02 AC 22 ms
7,716 KB
testcase_03 AC 22 ms
7,780 KB
testcase_04 WA -
testcase_05 WA -
testcase_06 WA -
testcase_07 AC 20 ms
7,644 KB
testcase_08 AC 21 ms
7,684 KB
testcase_09 WA -
testcase_10 WA -
testcase_11 WA -
testcase_12 AC 21 ms
7,828 KB
testcase_13 WA -
testcase_14 AC 21 ms
7,716 KB
testcase_15 WA -
testcase_16 AC 21 ms
7,656 KB
testcase_17 WA -
testcase_18 WA -
testcase_19 WA -
testcase_20 AC 22 ms
7,716 KB
testcase_21 AC 21 ms
7,788 KB
testcase_22 AC 21 ms
7,780 KB
testcase_23 AC 21 ms
7,792 KB
testcase_24 WA -
testcase_25 RE -
testcase_26 RE -
testcase_27 AC 21 ms
7,676 KB
testcase_28 AC 21 ms
7,640 KB
testcase_29 RE -
testcase_30 RE -
testcase_31 RE -
testcase_32 AC 21 ms
7,648 KB
testcase_33 RE -
testcase_34 AC 21 ms
7,792 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

from fractions import Fraction

H, M, S = raw_input().split()
H = int(H) - 9
H %= 24
M = int(M)
S = S[3:].split('.')
A = int(S[0])
B = 0 if len(S) <= 1 else int(S[1])
if A < 0:
    B *= -1
B = B * 6

H += A
M += B

H += (B / abs(B)) * abs(B) / 60
M %= 60

H %= 24
H = '0' + str(H) if H < 10 else str(H)
M = '0' + str(M) if M < 10 else str(M)

print str(H) + ':' + str(M)
0