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