結果

問題 No.333 門松列を数え上げ
ユーザー ichibanshibori
提出日時 2016-10-08 01:56:35
言語 OCaml
(5.2.1)
結果
WA  
実行時間 -
コード長 291 bytes
コンパイル時間 226 ms
コンパイル使用メモリ 19,692 KB
実行使用メモリ 5,248 KB
最終ジャッジ日時 2024-10-08 23:51:28
合計ジャッジ時間 831 ms
ジャッジサーバーID
(参考情報)
judge2 / judge5
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
sample AC * 2
other AC * 4 WA * 3
権限があれば一括ダウンロードができます

ソースコード

diff #

let () =
  let a, b = read_line () |>
             Str.split (Str.regexp_string " ") |>
             List.map int_of_string |>
             fun lst -> (List.nth lst 0, List.nth lst 1)
  in
  let ans = if a < b then b - 2
            else 2000000000 - a
  in
  print_int ans; print_newline ()
0