結果

問題 No.652 E869120 and TimeZone
ユーザー lloyzlloyz
提出日時 2022-08-02 00:56:03
言語 Python3
(3.13.1 + numpy 2.2.1 + scipy 1.14.1)
結果
WA  
実行時間 -
コード長 394 bytes
コンパイル時間 119 ms
コンパイル使用メモリ 12,544 KB
実行使用メモリ 10,880 KB
最終ジャッジ日時 2024-07-22 16:27:16
合計ジャッジ時間 2,155 ms
ジャッジサーバーID
(参考情報)
judge1 / judge2
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
sample AC * 5
other AC * 26 WA * 4
権限があれば一括ダウンロードができます

ソースコード

diff #

a, b, s = input().split()

a = int(a)
b = int(b)
t = a * 60 + b
if '.' not in s:
    x = int(s[3:])
    x *= 60
else:
    x = s[3:]
    x, f = x.split('.')
    x = int(x)
    x *= 60
    f = int(f)
    f *= 6
    if x >= 0:
        x += f
    else:
        x -= f
d = x - 60 * 9
t += d
if t < 0:
    t += 24 * 60
elif t >= 24 * 60:
    t -= 24 * 60
h, m = divmod(t, 60)
print(f"{h:02}:{m:02}")
0