結果

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

ソースコード

diff #

import math

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 = utc + math.ceil(d)
elif s[3] == "-":
    d = diff * 60 * (-1)
    res = utc + math.ceil(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