結果

問題 No.354 メルセンヌ素数
ユーザー moufuyumoufuyu
提出日時 2020-04-01 06:54:27
言語 Python3
(3.12.2 + numpy 1.26.4 + scipy 1.12.0)
結果
TLE  
実行時間 -
コード長 104 bytes
コンパイル時間 136 ms
コンパイル使用メモリ 10,648 KB
実行使用メモリ 16,244 KB
最終ジャッジ日時 2023-09-08 07:43:18
合計ジャッジ時間 3,235 ms
ジャッジサーバーID
(参考情報)
judge14 / judge15
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 16 ms
16,244 KB
testcase_01 AC 15 ms
7,772 KB
testcase_02 AC 16 ms
7,804 KB
testcase_03 AC 16 ms
7,856 KB
testcase_04 AC 18 ms
7,828 KB
testcase_05 AC 25 ms
7,764 KB
testcase_06 AC 196 ms
8,364 KB
testcase_07 TLE -
testcase_08 -- -
testcase_09 -- -
testcase_10 -- -
testcase_11 -- -
testcase_12 -- -
testcase_13 -- -
権限があれば一括ダウンロードができます

ソースコード

diff #

p = int(input())
m = 2 ** p - 1
l = []
while m > 1:
    l.append(m % 2)
    m = m // 2
print(sum(l) + 1)
0