結果
問題 |
No.2782 メルセンヌ数総乗
|
ユーザー |
![]() |
提出日時 | 2024-08-10 01:04:30 |
言語 | PyPy3 (7.3.15) |
結果 |
AC
|
実行時間 | 38 ms / 2,000 ms |
コード長 | 149 bytes |
コンパイル時間 | 518 ms |
コンパイル使用メモリ | 82,376 KB |
実行使用メモリ | 53,560 KB |
最終ジャッジ日時 | 2024-08-10 01:04:32 |
合計ジャッジ時間 | 2,233 ms |
ジャッジサーバーID (参考情報) |
judge5 / judge3 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
other | AC * 20 |
ソースコード
N = int(input()) M = 2**(N+1)-1 if N == 1: print("No") exit() s = 1 for i in range(2, N+1): s *= 2**i-1 s %= M print("Yes" if not s else "No")