結果

問題 No.1140 EXPotentiaLLL!
ユーザー simansiman
提出日時 2020-08-05 02:26:54
言語 Ruby
(3.3.0)
結果
WA  
実行時間 -
コード長 132 bytes
コンパイル時間 133 ms
コンパイル使用メモリ 11,244 KB
実行使用メモリ 15,688 KB
最終ジャッジ日時 2023-10-13 06:31:54
合計ジャッジ時間 16,349 ms
ジャッジサーバーID
(参考情報)
judge15 / judge14
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 1,770 ms
15,372 KB
testcase_01 AC 1,196 ms
15,360 KB
testcase_02 WA -
testcase_03 AC 1,298 ms
15,412 KB
testcase_04 AC 944 ms
15,388 KB
testcase_05 AC 1,474 ms
15,288 KB
testcase_06 WA -
testcase_07 TLE -
testcase_08 AC 82 ms
15,348 KB
testcase_09 WA -
testcase_10 WA -
testcase_11 WA -
testcase_12 AC 83 ms
15,192 KB
権限があれば一括ダウンロードができます
コンパイルメッセージ
Main.rb:11: warning: ambiguous first argument; put parentheses or a space even after `-' operator
Main.rb:6: warning: assigned but unused variable - a
Syntax OK

ソースコード

diff #

require 'prime'

T = gets.to_i

T.times do
  a, pv = gets.split.map(&:to_i)

  if pv.prime?
    puts 1
  else
    puts -1
  end
end
0