結果

問題 No.12 限定された素数
ユーザー syarosyaro
提出日時 2016-01-18 12:36:50
言語 Ruby
(3.3.0)
結果
WA  
実行時間 -
コード長 148 bytes
コンパイル時間 132 ms
コンパイル使用メモリ 11,936 KB
実行使用メモリ 28,040 KB
最終ジャッジ日時 2023-10-20 00:37:11
合計ジャッジ時間 38,862 ms
ジャッジサーバーID
(参考情報)
judge15 / judge13
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 WA -
testcase_01 AC 1,365 ms
28,032 KB
testcase_02 WA -
testcase_03 AC 1,352 ms
28,032 KB
testcase_04 WA -
testcase_05 AC 1,348 ms
28,032 KB
testcase_06 AC 1,391 ms
28,032 KB
testcase_07 AC 1,357 ms
28,032 KB
testcase_08 WA -
testcase_09 AC 1,356 ms
28,036 KB
testcase_10 WA -
testcase_11 AC 1,338 ms
28,032 KB
testcase_12 AC 1,341 ms
28,032 KB
testcase_13 AC 1,361 ms
28,032 KB
testcase_14 WA -
testcase_15 AC 1,346 ms
28,032 KB
testcase_16 AC 1,358 ms
28,040 KB
testcase_17 WA -
testcase_18 WA -
testcase_19 WA -
testcase_20 WA -
testcase_21 WA -
testcase_22 WA -
testcase_23 WA -
testcase_24 WA -
testcase_25 WA -
権限があれば一括ダウンロードができます
コンパイルメッセージ
Syntax OK

ソースコード

diff #

#!ruby -rprime
a=u=r=m=0
gets
gets.bytes{|c|a+=1<<c-48}
Prime.each(5e6){|q|r=[r,q+~m].max;q.to_s.bytes{|c|u|=1<<c-48};u|a>a&&m=q+u=0}
p r.+r<=>5e6-3
0