結果
問題 |
No.249 N言っちゃダメゲーム (2)
|
ユーザー |
|
提出日時 | 2020-07-02 02:37:37 |
言語 | OCaml (5.2.1) |
結果 |
RE
|
実行時間 | - |
コード長 | 319 bytes |
コンパイル時間 | 525 ms |
コンパイル使用メモリ | 21,572 KB |
実行使用メモリ | 5,248 KB |
最終ジャッジ日時 | 2024-10-09 01:46:00 |
合計ジャッジ時間 | 786 ms |
ジャッジサーバーID (参考情報) |
judge3 / judge4 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
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.sscanf (read_line ()) "%d %d" (calc first) then loop (i + 1) (acc + 1) false else loop (i + 1) acc true in loop 0 0 true