結果

問題 No.6 使いものにならないハッシュ
ユーザー 👑 hos.lyrichos.lyric
提出日時 2015-03-01 13:13:57
言語 Ruby
(3.3.0)
結果
AC  
実行時間 126 ms / 5,000 ms
コード長 148 bytes
コンパイル時間 147 ms
コンパイル使用メモリ 11,208 KB
実行使用メモリ 16,012 KB
最終ジャッジ日時 2023-10-14 22:49:54
合計ジャッジ時間 5,010 ms
ジャッジサーバーID
(参考情報)
judge13 / judge11
このコードへのチャレンジ(β)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 86 ms
15,256 KB
testcase_01 AC 84 ms
15,068 KB
testcase_02 AC 125 ms
16,012 KB
testcase_03 AC 96 ms
15,312 KB
testcase_04 AC 104 ms
15,560 KB
testcase_05 AC 106 ms
15,676 KB
testcase_06 AC 124 ms
15,828 KB
testcase_07 AC 122 ms
15,980 KB
testcase_08 AC 120 ms
15,812 KB
testcase_09 AC 121 ms
15,884 KB
testcase_10 AC 87 ms
15,104 KB
testcase_11 AC 97 ms
15,340 KB
testcase_12 AC 123 ms
15,992 KB
testcase_13 AC 121 ms
15,972 KB
testcase_14 AC 120 ms
15,928 KB
testcase_15 AC 121 ms
15,864 KB
testcase_16 AC 121 ms
15,928 KB
testcase_17 AC 124 ms
15,984 KB
testcase_18 AC 126 ms
16,008 KB
testcase_19 AC 123 ms
15,996 KB
testcase_20 AC 122 ms
15,932 KB
testcase_21 AC 90 ms
15,356 KB
testcase_22 AC 123 ms
15,924 KB
testcase_23 AC 123 ms
15,980 KB
testcase_24 AC 124 ms
15,928 KB
testcase_25 AC 122 ms
15,940 KB
testcase_26 AC 124 ms
15,920 KB
testcase_27 AC 122 ms
15,944 KB
testcase_28 AC 106 ms
15,732 KB
testcase_29 AC 124 ms
15,860 KB
testcase_30 AC 124 ms
16,008 KB
testcase_31 AC 124 ms
15,828 KB
権限があれば一括ダウンロードができます
コンパイルメッセージ
Syntax OK

ソースコード

diff #

require'prime'
k=gets.to_i
f=m=z=0
q=[]
Prime.each(gets.to_i){|x|x<k||(f-=1<<q.shift%9while f[x%9]>0
q<<x
f|=1<<x%9
l=q.size
m>l||(m=l;z=q[0]))}
p z
0