結果

問題 No.889 素数!
ユーザー TANIGUCHI KousukeTANIGUCHI Kousuke
提出日時 2019-11-08 18:28:16
言語 Ruby
(3.2.2)
結果
AC  
実行時間 97 ms / 2,000 ms
コード長 280 bytes
コンパイル時間 58 ms
コンパイル使用メモリ 11,480 KB
実行使用メモリ 15,564 KB
最終ジャッジ日時 2023-10-13 03:13:36
合計ジャッジ時間 8,747 ms
ジャッジサーバーID
(参考情報)
judge15 / judge11
このコードへのチャレンジ(β)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 92 ms
15,196 KB
testcase_01 AC 90 ms
15,316 KB
testcase_02 AC 91 ms
15,412 KB
testcase_03 AC 94 ms
15,324 KB
testcase_04 AC 89 ms
15,300 KB
testcase_05 AC 91 ms
15,348 KB
testcase_06 AC 90 ms
15,368 KB
testcase_07 AC 89 ms
15,336 KB
testcase_08 AC 91 ms
15,228 KB
testcase_09 AC 89 ms
15,356 KB
testcase_10 AC 89 ms
15,428 KB
testcase_11 AC 89 ms
15,360 KB
testcase_12 AC 91 ms
15,196 KB
testcase_13 AC 93 ms
15,168 KB
testcase_14 AC 91 ms
15,148 KB
testcase_15 AC 91 ms
15,152 KB
testcase_16 AC 88 ms
15,284 KB
testcase_17 AC 90 ms
15,400 KB
testcase_18 AC 90 ms
15,196 KB
testcase_19 AC 90 ms
15,500 KB
testcase_20 AC 91 ms
15,356 KB
testcase_21 AC 91 ms
15,368 KB
testcase_22 AC 91 ms
15,148 KB
testcase_23 AC 90 ms
15,396 KB
testcase_24 AC 91 ms
15,176 KB
testcase_25 AC 88 ms
15,096 KB
testcase_26 AC 89 ms
15,296 KB
testcase_27 AC 91 ms
15,224 KB
testcase_28 AC 91 ms
15,292 KB
testcase_29 AC 91 ms
15,164 KB
testcase_30 AC 91 ms
15,392 KB
testcase_31 AC 89 ms
15,152 KB
testcase_32 AC 89 ms
15,196 KB
testcase_33 AC 92 ms
15,204 KB
testcase_34 AC 92 ms
15,096 KB
testcase_35 AC 93 ms
15,300 KB
testcase_36 AC 92 ms
15,340 KB
testcase_37 AC 91 ms
15,152 KB
testcase_38 AC 91 ms
15,112 KB
testcase_39 AC 92 ms
15,112 KB
testcase_40 AC 91 ms
15,376 KB
testcase_41 AC 90 ms
15,416 KB
testcase_42 AC 90 ms
15,564 KB
testcase_43 AC 89 ms
15,096 KB
testcase_44 AC 97 ms
15,420 KB
testcase_45 AC 92 ms
15,092 KB
testcase_46 AC 90 ms
15,144 KB
testcase_47 AC 92 ms
15,148 KB
testcase_48 AC 90 ms
15,292 KB
testcase_49 AC 90 ms
15,340 KB
testcase_50 AC 89 ms
15,176 KB
testcase_51 AC 90 ms
15,384 KB
testcase_52 AC 89 ms
15,172 KB
testcase_53 AC 91 ms
15,380 KB
testcase_54 AC 90 ms
15,412 KB
testcase_55 AC 90 ms
15,164 KB
testcase_56 AC 90 ms
15,300 KB
testcase_57 AC 90 ms
15,132 KB
testcase_58 AC 89 ms
15,404 KB
testcase_59 AC 91 ms
15,232 KB
testcase_60 AC 90 ms
15,412 KB
testcase_61 AC 89 ms
15,340 KB
testcase_62 AC 89 ms
15,428 KB
testcase_63 AC 91 ms
15,340 KB
権限があれば一括ダウンロードができます
コンパイルメッセージ
Syntax OK

ソースコード

diff #

require 'prime'
A = Array.new(65, &:itself)
  .tap{|it| it[6] = it[28] = "Kanzensu!" }
  .tap{|it| (2 .. 4).each{|i| it[i**3] = "Ripposu!" } }
  .tap{|it| (2 .. 8).each{|i| it[i**2] = "Heihosu!" } }
  .tap{|it| (1 .. 64).each{|i| it[i] = "Sosu!" if i.prime? } }
puts A[gets.to_i]
0