結果
問題 |
No.1208 anti primenumber game
|
ユーザー |
![]() |
提出日時 | 2023-06-28 03:23:45 |
言語 | Ruby (3.4.1) |
結果 |
RE
|
実行時間 | - |
コード長 | 362 bytes |
コンパイル時間 | 33 ms |
コンパイル使用メモリ | 7,424 KB |
実行使用メモリ | 26,880 KB |
最終ジャッジ日時 | 2024-07-04 19:21:29 |
合計ジャッジ時間 | 7,563 ms |
ジャッジサーバーID (参考情報) |
judge3 / judge2 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
sample | AC * 2 RE * 1 |
other | AC * 37 WA * 4 RE * 3 |
コンパイルメッセージ
Syntax OK
ソースコード
N, M = gets.split.map(&:to_i) A = gets.split.map(&:to_i) if A[0] >= 2 puts 'First' elsif A[1] >= 2 puts 'Second' elsif A.all?(1) if N.even? puts 'Second' else if M == 0 puts 'First' else puts 'Second' end end else arr = A.take_while { |a| a == 1 } if arr.size.even? puts 'Second' else puts 'First' end end