結果
| 問題 | No.1208 anti primenumber game | 
| コンテスト | |
| ユーザー |  siman | 
| 提出日時 | 2023-06-28 03:25:01 | 
| 言語 | Ruby (3.4.1) | 
| 結果 | 
                                AC
                                 
                             | 
| 実行時間 | 169 ms / 2,000 ms | 
| コード長 | 372 bytes | 
| コンパイル時間 | 334 ms | 
| コンパイル使用メモリ | 7,424 KB | 
| 実行使用メモリ | 26,752 KB | 
| 最終ジャッジ日時 | 2024-07-04 19:23:23 | 
| 合計ジャッジ時間 | 8,336 ms | 
| ジャッジサーバーID (参考情報) | judge4 / judge5 | 
(要ログイン)
| ファイルパターン | 結果 | 
|---|---|
| sample | AC * 3 | 
| other | AC * 44 | 
コンパイルメッセージ
Syntax OK
ソースコード
N, M = gets.split.map(&:to_i)
A = gets.split.map(&:to_i)
if A[0] >= 2
  puts 'First'
elsif N >= 2 && 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 'First'
  else
    puts 'Second'
  end
end
            
            
            
        