結果

問題 No.1218 Something Like a Theorem
ユーザー KisaragiEffectiveKisaragiEffective
提出日時 2020-11-11 20:56:45
言語 Ruby
(3.3.0)
結果
WA  
実行時間 -
コード長 202 bytes
コンパイル時間 50 ms
コンパイル使用メモリ 11,380 KB
実行使用メモリ 15,324 KB
最終ジャッジ日時 2023-09-30 00:54:23
合計ジャッジ時間 2,439 ms
ジャッジサーバーID
(参考情報)
judge13 / judge15
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 75 ms
15,120 KB
testcase_01 AC 76 ms
15,180 KB
testcase_02 AC 75 ms
15,080 KB
testcase_03 AC 76 ms
15,244 KB
testcase_04 AC 76 ms
15,088 KB
testcase_05 AC 75 ms
15,036 KB
testcase_06 AC 80 ms
15,048 KB
testcase_07 AC 76 ms
15,080 KB
testcase_08 WA -
testcase_09 AC 76 ms
15,324 KB
testcase_10 AC 76 ms
15,168 KB
testcase_11 AC 75 ms
15,116 KB
testcase_12 WA -
testcase_13 AC 76 ms
15,320 KB
testcase_14 AC 76 ms
15,084 KB
testcase_15 AC 75 ms
15,224 KB
testcase_16 AC 75 ms
15,032 KB
testcase_17 AC 77 ms
15,024 KB
権限があれば一括ダウンロードができます
コンパイルメッセージ
Syntax OK

ソースコード

diff #

n,z = gets.split.map(&:to_i)
Y,N=%w(Yes No)
ans="???"
if n == 1 then
    ans=z != 1 ? Y : N
elsif n == 2 then
    ans = z % 5 == 0 ? Y : N
else
    #フェルマーの最終定理
    ans=N
end
puts ans
0