結果
| 問題 | No.354 メルセンヌ素数 |
| コンテスト | |
| ユーザー |
💕💖💞
|
| 提出日時 | 2016-09-10 12:07:41 |
| 言語 | PyPy2 (7.3.15) |
| 結果 |
RE
|
| 実行時間 | - |
| コード長 | 412 bytes |
| 記録 | |
| コンパイル時間 | 200 ms |
| コンパイル使用メモリ | 77,604 KB |
| 最終ジャッジ日時 | 2025-12-03 21:27:51 |
|
ジャッジサーバーID (参考情報) |
judge2 / judge1 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| sample | AC * 1 |
| other | AC * 3 RE * 10 |
ソースコード
import sys
import os
import collections
import math
def prime_table(n):
list = [True for _ in xrange(n + 1)]
i = 2
while i * i <= n:
if list[i]:
j = i + i
while j <= n:
list[j] = False
j += i
i += 1
table = [i for i in xrange(n + 1) if list[i] and i >= 2]
return table
def may_mel(p):
print len(format(int(math.pow(2, p))-1, "b"))
may_mel(int(raw_input()))
💕💖💞