結果

問題 No.652 E869120 and TimeZone
ユーザー Meso Meso
提出日時 2024-12-29 19:16:17
言語 Python3
(3.13.1 + numpy 2.2.1 + scipy 1.14.1)
結果
WA  
実行時間 -
コード長 465 bytes
コンパイル時間 148 ms
コンパイル使用メモリ 12,544 KB
実行使用メモリ 10,752 KB
最終ジャッジ日時 2024-12-29 19:16:21
合計ジャッジ時間 2,556 ms
ジャッジサーバーID
(参考情報)
judge5 / judge2
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
sample AC * 5
other AC * 28 WA * 2
権限があれば一括ダウンロードができます

ソースコード

diff #

a, b, s = input().split()
a = int(a)
b = int(b)
utc = a * 60 + b - 540
diff = "".join(filter(lambda x:x.isdigit() or x == ".", s))
diff = float(diff)
s = list(s)

res = 0
if s[3] == "+":
    d = diff * 60
    res = int(utc + d)
elif s[3] == "-":
    d = diff * 60
    res = int(utc - d)

if res >= 1440:
    h = res // 60 - 24
    m = res % 60
elif res <=0:
    h = res // 60 + 24
    m = res % 60
else:
    h = res // 60
    m = res % 60

print(f'{h:0=2}:{m:0=2}')
0