結果

問題 No.354 メルセンヌ素数
ユーザー harhogefooharhogefoo
提出日時 2016-10-14 09:11:00
言語 Ruby
(3.3.0)
結果
RE  
実行時間 -
コード長 54 bytes
コンパイル時間 139 ms
コンパイル使用メモリ 7,552 KB
実行使用メモリ 38,888 KB
最終ジャッジ日時 2024-05-01 22:36:43
合計ジャッジ時間 2,031 ms
ジャッジサーバーID
(参考情報)
judge2 / judge4
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 85 ms
12,416 KB
testcase_01 AC 86 ms
12,160 KB
testcase_02 AC 81 ms
12,288 KB
testcase_03 AC 81 ms
12,288 KB
testcase_04 AC 81 ms
12,160 KB
testcase_05 AC 81 ms
12,416 KB
testcase_06 AC 83 ms
12,288 KB
testcase_07 AC 79 ms
12,288 KB
testcase_08 AC 86 ms
12,928 KB
testcase_09 AC 97 ms
16,640 KB
testcase_10 AC 207 ms
38,888 KB
testcase_11 RE -
testcase_12 RE -
testcase_13 RE -
権限があれば一括ダウンロードができます
コンパイルメッセージ
Syntax OK

ソースコード

diff #

p = gets.to_i
p = 2 ** p - 1
puts p.to_s(2).count("1")
0