結果
問題 |
No.525 二度寝の季節
|
ユーザー |
|
提出日時 | 2019-08-21 17:13:26 |
言語 | OCaml (5.2.1) |
結果 |
AC
|
実行時間 | 2 ms / 1,000 ms |
コード長 | 386 bytes |
コンパイル時間 | 477 ms |
コンパイル使用メモリ | 21,764 KB |
実行使用メモリ | 5,248 KB |
最終ジャッジ日時 | 2024-10-09 00:49:02 |
合計ジャッジ時間 | 1,306 ms |
ジャッジサーバーID (参考情報) |
judge1 / judge4 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
sample | AC * 2 |
other | AC * 33 |
ソースコード
let () = let h, t = Scanf.scanf "%2d:%2d\n" (fun a b -> a, b) in let tt, b = if t < 55 then t+5, false else t+5-60, true in let hh = if b && h < 23 then h+1 else if b then 0 else h in let ts = if tt < 10 then "0" ^ string_of_int tt else string_of_int tt in let hs = if hh < 10 then "0" ^ string_of_int hh else string_of_int hh in Printf.printf "%s:%s\n" hs ts