結果

問題 No.354 メルセンヌ素数
ユーザー Python00391232Python00391232
提出日時 2016-04-26 02:51:51
言語 Python3
(3.12.2 + numpy 1.26.4 + scipy 1.12.0)
結果
TLE  
実行時間 -
コード長 267 bytes
コンパイル時間 87 ms
コンパイル使用メモリ 12,672 KB
実行使用メモリ 243,972 KB
最終ジャッジ日時 2024-04-15 04:31:53
合計ジャッジ時間 4,420 ms
ジャッジサーバーID
(参考情報)
judge2 / judge4
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 30 ms
17,692 KB
testcase_01 AC 29 ms
10,752 KB
testcase_02 AC 30 ms
10,624 KB
testcase_03 AC 26 ms
10,880 KB
testcase_04 AC 27 ms
10,752 KB
testcase_05 AC 27 ms
10,752 KB
testcase_06 AC 34 ms
11,008 KB
testcase_07 AC 59 ms
12,288 KB
testcase_08 AC 321 ms
23,524 KB
testcase_09 TLE -
testcase_10 TLE -
testcase_11 -- -
testcase_12 -- -
testcase_13 -- -
権限があれば一括ダウンロードができます

ソースコード

diff #

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