結果

問題 No.6 使いものにならないハッシュ
ユーザー syarosyaro
提出日時 2017-10-16 23:45:52
言語 Ruby
(3.3.0)
結果
AC  
実行時間 136 ms / 5,000 ms
コード長 117 bytes
コンパイル時間 131 ms
コンパイル使用メモリ 11,564 KB
実行使用メモリ 16,504 KB
最終ジャッジ日時 2023-10-14 23:07:47
合計ジャッジ時間 5,536 ms
ジャッジサーバーID
(参考情報)
judge14 / judge11
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 126 ms
16,052 KB
testcase_01 AC 125 ms
15,884 KB
testcase_02 AC 134 ms
16,276 KB
testcase_03 AC 131 ms
16,336 KB
testcase_04 AC 126 ms
16,092 KB
testcase_05 AC 127 ms
16,504 KB
testcase_06 AC 128 ms
16,104 KB
testcase_07 AC 127 ms
16,184 KB
testcase_08 AC 129 ms
16,316 KB
testcase_09 AC 127 ms
16,016 KB
testcase_10 AC 125 ms
15,900 KB
testcase_11 AC 126 ms
16,480 KB
testcase_12 AC 131 ms
16,332 KB
testcase_13 AC 124 ms
15,872 KB
testcase_14 AC 125 ms
16,108 KB
testcase_15 AC 132 ms
16,280 KB
testcase_16 AC 129 ms
16,316 KB
testcase_17 AC 132 ms
16,392 KB
testcase_18 AC 136 ms
16,360 KB
testcase_19 AC 133 ms
16,368 KB
testcase_20 AC 132 ms
16,264 KB
testcase_21 AC 129 ms
16,108 KB
testcase_22 AC 133 ms
16,184 KB
testcase_23 AC 132 ms
16,408 KB
testcase_24 AC 132 ms
16,176 KB
testcase_25 AC 128 ms
16,080 KB
testcase_26 AC 135 ms
16,400 KB
testcase_27 AC 130 ms
16,128 KB
testcase_28 AC 129 ms
16,480 KB
testcase_29 AC 135 ms
16,488 KB
testcase_30 AC 134 ms
16,484 KB
testcase_31 AC 132 ms
16,308 KB
権限があれば一括ダウンロードができます
コンパイルメッセージ
Syntax OK

ソースコード

diff #

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