結果
| 問題 |
No.652 E869120 and TimeZone
|
| コンテスト | |
| ユーザー |
|
| 提出日時 | 2024-12-29 19:47:47 |
| 言語 | Python3 (3.13.1 + numpy 2.2.1 + scipy 1.14.1) |
| 結果 |
WA
|
| 実行時間 | - |
| コード長 | 517 bytes |
| コンパイル時間 | 248 ms |
| コンパイル使用メモリ | 12,544 KB |
| 実行使用メモリ | 10,880 KB |
| 最終ジャッジ日時 | 2024-12-29 19:47:50 |
| 合計ジャッジ時間 | 2,517 ms |
|
ジャッジサーバーID (参考情報) |
judge1 / judge4 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| sample | AC * 5 |
| other | AC * 29 WA * 1 |
ソースコード
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 = round(diff * 60, 3)
res = utc + math.ceil(d)
elif s[3] == "-":
d = round(diff * 60 * (-1), 3)
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}')