結果
問題 |
No.249 N言っちゃダメゲーム (2)
|
ユーザー |
|
提出日時 | 2020-07-02 02:37:00 |
言語 | OCaml (5.2.1) |
結果 |
RE
|
実行時間 | - |
コード長 | 304 bytes |
コンパイル時間 | 282 ms |
コンパイル使用メモリ | 21,576 KB |
実行使用メモリ | 5,248 KB |
最終ジャッジ日時 | 2024-10-09 01:45:35 |
合計ジャッジ時間 | 837 ms |
ジャッジサーバーID (参考情報) |
judge2 / judge3 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
other | WA * 1 RE * 2 |
ソースコード
let calc turn n k = if n mod (k + 1) = 1 then not turn else turn in let rec loop i acc first = if i = 1000 then Printf.printf "%d\n" acc else if Scanf.scanf "%d %d " (calc first) then loop (i + 1) (acc + 1) false else loop (i + 1) acc true in loop 0 0 true