結果
問題 |
No.652 E869120 and TimeZone
|
ユーザー |
👑 |
提出日時 | 2019-04-08 17:53:35 |
言語 | Lua (LuaJit 2.1.1734355927) |
結果 |
WA
|
実行時間 | - |
コード長 | 290 bytes |
コンパイル時間 | 111 ms |
コンパイル使用メモリ | 7,072 KB |
実行使用メモリ | 6,944 KB |
最終ジャッジ日時 | 2024-07-01 22:53:31 |
合計ジャッジ時間 | 1,466 ms |
ジャッジサーバーID (参考情報) |
judge5 / judge2 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
sample | AC * 5 |
other | AC * 26 WA * 4 |
ソースコード
s = io.read() hour, min, pm, utc = string.match(s, "(%d+) (%d+) UTC([%+%-])([%.%d]+)") hour, min, utc = tonumber(hour), tonumber(min), tonumber(utc) if(pm == "-") then utc = -utc end v = (hour + utc - 9) * 60 + min v = v % 1440 print(string.format("%02d:%02d", math.floor(v / 60), v % 60))