結果

問題 No.354 メルセンヌ素数
ユーザー Takuya NoguchiTakuya Noguchi
提出日時 2018-03-12 21:08:29
言語 Ruby
(3.3.0)
結果
TLE  
実行時間 -
コード長 72 bytes
コンパイル時間 53 ms
コンパイル使用メモリ 7,296 KB
実行使用メモリ 240,384 KB
最終ジャッジ日時 2024-04-26 16:35:26
合計ジャッジ時間 5,969 ms
ジャッジサーバーID
(参考情報)
judge2 / judge3
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 100 ms
12,160 KB
testcase_01 AC 87 ms
12,160 KB
testcase_02 AC 88 ms
12,288 KB
testcase_03 AC 93 ms
12,032 KB
testcase_04 AC 93 ms
12,416 KB
testcase_05 AC 92 ms
12,288 KB
testcase_06 AC 102 ms
13,440 KB
testcase_07 AC 131 ms
19,584 KB
testcase_08 AC 428 ms
78,464 KB
testcase_09 TLE -
testcase_10 TLE -
testcase_11 -- -
testcase_12 -- -
testcase_13 -- -
権限があれば一括ダウンロードができます
コンパイルメッセージ
Syntax OK

ソースコード

diff #

p = gets.to_i
puts (2**p - 1).to_s(2).chars.select { |c| c == '1' }.size
0