結果
問題 |
No.354 メルセンヌ素数
|
ユーザー |
|
提出日時 | 2016-05-22 19:19:19 |
言語 | Python3 (3.13.1 + numpy 2.2.1 + scipy 1.14.1) |
結果 |
WA
|
実行時間 | - |
コード長 | 126 bytes |
コンパイル時間 | 227 ms |
コンパイル使用メモリ | 12,672 KB |
実行使用メモリ | 43,328 KB |
最終ジャッジ日時 | 2024-10-06 20:36:53 |
合計ジャッジ時間 | 2,243 ms |
ジャッジサーバーID (参考情報) |
judge3 / judge4 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
sample | AC * 1 |
other | AC * 2 WA * 1 RE * 10 |
ソースコード
import math p = int(input()) n = 2**p - 1 c = 0 m = n while m > 0: c += int(m % 2) m = math.floor(m / 2) print(c)