結果
| 問題 |
No.652 E869120 and TimeZone
|
| コンテスト | |
| ユーザー |
|
| 提出日時 | 2018-02-27 23:08:19 |
| 言語 | Python2 (2.7.18) |
| 結果 |
WA
|
| 実行時間 | - |
| コード長 | 286 bytes |
| コンパイル時間 | 104 ms |
| コンパイル使用メモリ | 7,040 KB |
| 実行使用メモリ | 6,824 KB |
| 最終ジャッジ日時 | 2024-12-17 13:51:35 |
| 合計ジャッジ時間 | 1,394 ms |
|
ジャッジサーバーID (参考情報) |
judge5 / judge3 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| sample | AC * 4 WA * 1 |
| other | AC * 23 WA * 7 |
ソースコード
H, M, S = raw_input().split()
ans = int(H) * 60 + int(M)
S = S[3:].split('.')
sign = S[0][0]
A = int(S[0][1:])
B = 0 if len(S) <= 1 else int(S[1])
if sign == '-':
B *= -1
B = B * 6
C = 9 * 60
D = A * 60 + B - C
ans += D
ans %= 24 * 60
print "%02d:%02d" % (ans / 60, ans % 60)