結果

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

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 29 ms
17,696 KB
testcase_01 AC 27 ms
10,752 KB
testcase_02 AC 27 ms
10,752 KB
testcase_03 AC 28 ms
10,880 KB
testcase_04 AC 28 ms
10,880 KB
testcase_05 AC 28 ms
10,752 KB
testcase_06 AC 35 ms
11,008 KB
testcase_07 AC 64 ms
12,288 KB
testcase_08 AC 323 ms
23,544 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(len(mel_lists) - sets_mel.count(0))
0