結果

問題 No.1140 EXPotentiaLLL!
ユーザー siman
提出日時 2020-08-05 02:26:54
言語 Ruby
(3.4.1)
結果
WA  
実行時間 -
コード長 132 bytes
コンパイル時間 156 ms
コンパイル使用メモリ 7,552 KB
実行使用メモリ 12,928 KB
最終ジャッジ日時 2024-09-15 03:47:00
合計ジャッジ時間 9,998 ms
ジャッジサーバーID
(参考情報)
judge2 / judge3
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
sample AC * 1
other AC * 6 WA * 5 TLE * 1
権限があれば一括ダウンロードができます
コンパイルメッセージ
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