結果

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

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 95 ms
15,420 KB
testcase_01 AC 93 ms
15,348 KB
testcase_02 AC 136 ms
15,968 KB
testcase_03 AC 104 ms
15,448 KB
testcase_04 AC 111 ms
15,748 KB
testcase_05 AC 113 ms
15,760 KB
testcase_06 AC 130 ms
15,904 KB
testcase_07 AC 130 ms
15,964 KB
testcase_08 AC 133 ms
15,880 KB
testcase_09 AC 131 ms
15,980 KB
testcase_10 AC 95 ms
15,300 KB
testcase_11 AC 106 ms
15,576 KB
testcase_12 AC 134 ms
16,080 KB
testcase_13 AC 130 ms
16,092 KB
testcase_14 AC 132 ms
15,964 KB
testcase_15 AC 135 ms
15,912 KB
testcase_16 AC 131 ms
15,908 KB
testcase_17 AC 134 ms
15,824 KB
testcase_18 AC 136 ms
15,960 KB
testcase_19 AC 134 ms
16,092 KB
testcase_20 AC 135 ms
15,916 KB
testcase_21 AC 100 ms
15,396 KB
testcase_22 AC 135 ms
15,824 KB
testcase_23 AC 135 ms
16,060 KB
testcase_24 AC 134 ms
15,988 KB
testcase_25 AC 133 ms
15,976 KB
testcase_26 AC 135 ms
15,912 KB
testcase_27 AC 133 ms
15,888 KB
testcase_28 AC 115 ms
15,628 KB
testcase_29 AC 136 ms
15,904 KB
testcase_30 AC 134 ms
16,016 KB
testcase_31 AC 135 ms
15,964 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