結果

問題 No.354 メルセンヌ素数
コンテスト
ユーザー Python00391232
提出日時 2016-04-26 02:51:51
言語 Python3
(3.14.7 + numpy 2.5.2 + scipy 1.18.0 + ACL)
コンパイル:
python3 -mpy_compile _filename_
実行:
python3 _filename_
結果
TLE  
実行時間 -
コード長 267 bytes
記録
記録タグの例:
初AC ショートコード 純ショートコード 純主流ショートコード 最速実行時間
コンパイル時間 55 ms
コンパイル使用メモリ 14,976 KB
実行使用メモリ 366,092 KB
最終ジャッジ日時 2026-09-10 05:33:11
合計ジャッジ時間 6,229 ms
ジャッジサーバーID
(参考情報)
judge2_0 / judge1_0
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
sample AC * 1
other AC * 9 TLE * 1 -- * 3
権限があれば一括ダウンロードができます

ソースコード

diff #
raw source code

p = int(input())

mel = 2**p - 1
mel_bit = bin(mel)
mel_lists = list(mel_bit)
def num_Change(n):
	try:
		return int(n)
	except Exception:
		return 0
		
sets_mel = []
for i in range(len(mel_lists)):
	sets_mel.append(num_Change(mel_lists[i]))
	
print(sets_mel.count(1))
0