結果
| 問題 | 
                            No.652 E869120 and TimeZone
                             | 
                    
| コンテスト | |
| ユーザー | 
                             | 
                    
| 提出日時 | 2024-12-28 21:57:27 | 
| 言語 | Python3  (3.13.1 + numpy 2.2.1 + scipy 1.14.1)  | 
                    
| 結果 | 
                             
                                WA
                                 
                             
                            
                         | 
                    
| 実行時間 | - | 
| コード長 | 464 bytes | 
| コンパイル時間 | 609 ms | 
| コンパイル使用メモリ | 12,416 KB | 
| 実行使用メモリ | 10,752 KB | 
| 最終ジャッジ日時 | 2024-12-28 21:57:31 | 
| 合計ジャッジ時間 | 2,976 ms | 
| 
                            ジャッジサーバーID (参考情報)  | 
                        judge4 / judge2 | 
(要ログイン)
| ファイルパターン | 結果 | 
|---|---|
| sample | AC * 5 | 
| other | AC * 28 WA * 2 | 
ソースコード
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}')