結果

問題 No.889 素数!
ユーザー 👑 horiesinitihoriesiniti
提出日時 2023-02-07 04:22:57
言語 Ruby
(3.3.0)
結果
AC  
実行時間 98 ms / 2,000 ms
コード長 261 bytes
コンパイル時間 155 ms
コンパイル使用メモリ 11,572 KB
実行使用メモリ 15,480 KB
最終ジャッジ日時 2023-09-18 13:31:28
合計ジャッジ時間 9,598 ms
ジャッジサーバーID
(参考情報)
judge11 / judge14
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 91 ms
15,196 KB
testcase_01 AC 88 ms
15,200 KB
testcase_02 AC 90 ms
15,200 KB
testcase_03 AC 89 ms
15,380 KB
testcase_04 AC 88 ms
15,208 KB
testcase_05 AC 89 ms
15,200 KB
testcase_06 AC 90 ms
15,200 KB
testcase_07 AC 90 ms
15,216 KB
testcase_08 AC 88 ms
15,344 KB
testcase_09 AC 92 ms
15,144 KB
testcase_10 AC 91 ms
15,348 KB
testcase_11 AC 90 ms
15,188 KB
testcase_12 AC 88 ms
15,352 KB
testcase_13 AC 90 ms
15,112 KB
testcase_14 AC 89 ms
15,380 KB
testcase_15 AC 88 ms
15,280 KB
testcase_16 AC 89 ms
15,376 KB
testcase_17 AC 89 ms
15,180 KB
testcase_18 AC 88 ms
15,100 KB
testcase_19 AC 89 ms
15,340 KB
testcase_20 AC 89 ms
15,168 KB
testcase_21 AC 88 ms
15,156 KB
testcase_22 AC 88 ms
15,304 KB
testcase_23 AC 90 ms
15,144 KB
testcase_24 AC 89 ms
15,104 KB
testcase_25 AC 89 ms
15,244 KB
testcase_26 AC 91 ms
15,336 KB
testcase_27 AC 89 ms
15,104 KB
testcase_28 AC 90 ms
15,376 KB
testcase_29 AC 88 ms
15,212 KB
testcase_30 AC 88 ms
15,208 KB
testcase_31 AC 89 ms
15,180 KB
testcase_32 AC 90 ms
15,428 KB
testcase_33 AC 89 ms
15,140 KB
testcase_34 AC 90 ms
15,316 KB
testcase_35 AC 97 ms
15,288 KB
testcase_36 AC 90 ms
15,440 KB
testcase_37 AC 92 ms
15,440 KB
testcase_38 AC 91 ms
15,316 KB
testcase_39 AC 91 ms
15,140 KB
testcase_40 AC 90 ms
15,408 KB
testcase_41 AC 91 ms
15,212 KB
testcase_42 AC 89 ms
15,312 KB
testcase_43 AC 90 ms
15,224 KB
testcase_44 AC 89 ms
15,340 KB
testcase_45 AC 89 ms
15,332 KB
testcase_46 AC 91 ms
15,232 KB
testcase_47 AC 91 ms
15,096 KB
testcase_48 AC 90 ms
15,196 KB
testcase_49 AC 90 ms
15,308 KB
testcase_50 AC 92 ms
15,376 KB
testcase_51 AC 92 ms
15,352 KB
testcase_52 AC 89 ms
15,296 KB
testcase_53 AC 92 ms
15,404 KB
testcase_54 AC 92 ms
15,152 KB
testcase_55 AC 91 ms
15,480 KB
testcase_56 AC 90 ms
15,380 KB
testcase_57 AC 89 ms
15,340 KB
testcase_58 AC 90 ms
15,356 KB
testcase_59 AC 90 ms
15,144 KB
testcase_60 AC 95 ms
15,184 KB
testcase_61 AC 97 ms
15,092 KB
testcase_62 AC 97 ms
15,220 KB
testcase_63 AC 98 ms
15,232 KB
権限があれば一括ダウンロードができます
コンパイルメッセージ
Syntax OK

ソースコード

diff #

require 'prime'
hs2={}
hs3={}
2.upto(10){|i|
	hs2[i**2]=0
	hs3[i**3]=0
}
n=gets.to_i
if hs2.member?(n) then
	puts "Heihosu!"
elsif hs3.member?(n) then
	puts "Ripposu!"
elsif n.prime? then
	puts "Sosu!"
elsif n==6 || n==28 then
	puts "Kanzensu!"
else
	puts n
end
0