結果

問題 No.6 使いものにならないハッシュ
ユーザー syarosyaro
提出日時 2017-10-17 16:22:59
言語 Ruby
(3.3.0)
結果
AC  
実行時間 134 ms / 5,000 ms
コード長 114 bytes
コンパイル時間 47 ms
コンパイル使用メモリ 11,436 KB
実行使用メモリ 16,624 KB
最終ジャッジ日時 2023-10-14 23:08:29
合計ジャッジ時間 5,591 ms
ジャッジサーバーID
(参考情報)
judge15 / judge11
このコードへのチャレンジ(β)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 123 ms
16,064 KB
testcase_01 AC 123 ms
15,940 KB
testcase_02 AC 134 ms
16,244 KB
testcase_03 AC 126 ms
16,620 KB
testcase_04 AC 127 ms
16,488 KB
testcase_05 AC 128 ms
16,440 KB
testcase_06 AC 128 ms
16,132 KB
testcase_07 AC 126 ms
16,328 KB
testcase_08 AC 127 ms
16,152 KB
testcase_09 AC 123 ms
16,188 KB
testcase_10 AC 124 ms
15,964 KB
testcase_11 AC 126 ms
16,376 KB
testcase_12 AC 133 ms
16,428 KB
testcase_13 AC 123 ms
15,988 KB
testcase_14 AC 124 ms
16,112 KB
testcase_15 AC 129 ms
16,224 KB
testcase_16 AC 126 ms
16,228 KB
testcase_17 AC 130 ms
16,336 KB
testcase_18 AC 134 ms
16,624 KB
testcase_19 AC 130 ms
16,516 KB
testcase_20 AC 129 ms
16,232 KB
testcase_21 AC 125 ms
16,624 KB
testcase_22 AC 130 ms
16,324 KB
testcase_23 AC 130 ms
16,424 KB
testcase_24 AC 129 ms
16,336 KB
testcase_25 AC 127 ms
16,304 KB
testcase_26 AC 132 ms
16,280 KB
testcase_27 AC 128 ms
16,196 KB
testcase_28 AC 128 ms
16,252 KB
testcase_29 AC 131 ms
16,392 KB
testcase_30 AC 133 ms
16,412 KB
testcase_31 AC 131 ms
16,168 KB
権限があれば一括ダウンロードができます
コンパイルメッセージ
Syntax OK

ソースコード

diff #

require'prime'
q=[]
p Prime.each(2e5).grep(eval'%d..%d'%[*$<]).reverse.max_by{|a|q<<a%=9
q=a,*q[0,s=q.index(a)]
s}
0