結果

問題 No.1208 anti primenumber game
ユーザー simansiman
提出日時 2023-06-28 03:22:48
言語 Ruby
(3.3.0)
結果
WA  
実行時間 -
コード長 330 bytes
コンパイル時間 110 ms
コンパイル使用メモリ 11,456 KB
実行使用メモリ 29,456 KB
最終ジャッジ日時 2023-09-18 02:34:38
合計ジャッジ時間 9,401 ms
ジャッジサーバーID
(参考情報)
judge12 / judge14
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 78 ms
15,112 KB
testcase_01 AC 80 ms
15,264 KB
testcase_02 AC 81 ms
15,052 KB
testcase_03 AC 80 ms
15,032 KB
testcase_04 AC 80 ms
15,156 KB
testcase_05 AC 79 ms
15,240 KB
testcase_06 AC 79 ms
15,364 KB
testcase_07 AC 77 ms
15,160 KB
testcase_08 AC 79 ms
15,184 KB
testcase_09 AC 80 ms
15,308 KB
testcase_10 AC 78 ms
15,268 KB
testcase_11 AC 78 ms
15,160 KB
testcase_12 AC 79 ms
15,300 KB
testcase_13 AC 78 ms
15,096 KB
testcase_14 AC 79 ms
15,232 KB
testcase_15 AC 150 ms
27,088 KB
testcase_16 AC 150 ms
27,128 KB
testcase_17 AC 150 ms
27,096 KB
testcase_18 AC 150 ms
26,912 KB
testcase_19 AC 150 ms
27,060 KB
testcase_20 AC 151 ms
26,920 KB
testcase_21 WA -
testcase_22 AC 144 ms
26,900 KB
testcase_23 WA -
testcase_24 AC 158 ms
29,300 KB
testcase_25 AC 158 ms
29,456 KB
testcase_26 AC 156 ms
29,016 KB
testcase_27 AC 154 ms
28,972 KB
testcase_28 AC 156 ms
29,012 KB
testcase_29 AC 160 ms
29,064 KB
testcase_30 WA -
testcase_31 WA -
testcase_32 WA -
testcase_33 AC 143 ms
27,208 KB
testcase_34 AC 143 ms
26,848 KB
testcase_35 AC 144 ms
27,140 KB
testcase_36 AC 129 ms
24,320 KB
testcase_37 AC 144 ms
27,104 KB
testcase_38 WA -
testcase_39 AC 155 ms
28,572 KB
testcase_40 AC 160 ms
28,976 KB
testcase_41 WA -
testcase_42 AC 146 ms
27,352 KB
testcase_43 WA -
testcase_44 AC 143 ms
27,320 KB
testcase_45 WA -
testcase_46 AC 139 ms
25,584 KB
権限があれば一括ダウンロードができます
コンパイルメッセージ
Syntax OK

ソースコード

diff #

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
0