結果

問題 No.1208 anti primenumber game
ユーザー simansiman
提出日時 2023-06-28 03:23:45
言語 Ruby
(3.3.0)
結果
RE  
実行時間 -
コード長 362 bytes
コンパイル時間 161 ms
コンパイル使用メモリ 11,348 KB
実行使用メモリ 29,488 KB
最終ジャッジ日時 2023-09-18 02:35:24
合計ジャッジ時間 8,308 ms
ジャッジサーバーID
(参考情報)
judge12 / judge14
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 81 ms
15,256 KB
testcase_01 RE -
testcase_02 AC 79 ms
15,048 KB
testcase_03 RE -
testcase_04 AC 77 ms
15,088 KB
testcase_05 AC 79 ms
15,088 KB
testcase_06 RE -
testcase_07 AC 79 ms
15,236 KB
testcase_08 AC 78 ms
15,112 KB
testcase_09 RE -
testcase_10 AC 80 ms
15,148 KB
testcase_11 AC 79 ms
15,092 KB
testcase_12 AC 79 ms
15,080 KB
testcase_13 AC 80 ms
15,160 KB
testcase_14 AC 81 ms
15,164 KB
testcase_15 AC 153 ms
27,144 KB
testcase_16 AC 151 ms
27,100 KB
testcase_17 AC 152 ms
26,892 KB
testcase_18 AC 151 ms
26,912 KB
testcase_19 AC 151 ms
26,840 KB
testcase_20 AC 150 ms
27,160 KB
testcase_21 AC 145 ms
26,984 KB
testcase_22 AC 144 ms
27,116 KB
testcase_23 AC 145 ms
26,952 KB
testcase_24 AC 160 ms
29,400 KB
testcase_25 AC 160 ms
29,488 KB
testcase_26 AC 158 ms
29,092 KB
testcase_27 AC 158 ms
29,220 KB
testcase_28 AC 160 ms
28,968 KB
testcase_29 AC 159 ms
29,240 KB
testcase_30 WA -
testcase_31 WA -
testcase_32 WA -
testcase_33 AC 145 ms
26,880 KB
testcase_34 AC 145 ms
27,116 KB
testcase_35 AC 149 ms
26,956 KB
testcase_36 AC 130 ms
24,308 KB
testcase_37 AC 144 ms
26,952 KB
testcase_38 AC 157 ms
28,536 KB
testcase_39 AC 158 ms
28,372 KB
testcase_40 AC 158 ms
29,052 KB
testcase_41 WA -
testcase_42 AC 144 ms
27,232 KB
testcase_43 AC 146 ms
27,340 KB
testcase_44 AC 147 ms
27,132 KB
testcase_45 AC 147 ms
27,060 KB
testcase_46 AC 140 ms
25,756 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[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
0