結果
問題 |
No.2782 メルセンヌ数総乗
|
ユーザー |
![]() |
提出日時 | 2025-02-20 22:09:31 |
言語 | Go (1.23.4) |
結果 |
AC
|
実行時間 | 2 ms / 2,000 ms |
コード長 | 255 bytes |
コンパイル時間 | 12,660 ms |
コンパイル使用メモリ | 243,540 KB |
実行使用メモリ | 6,820 KB |
最終ジャッジ日時 | 2025-02-20 22:09:48 |
合計ジャッジ時間 | 13,734 ms |
ジャッジサーバーID (参考情報) |
judge5 / judge1 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
other | AC * 20 |
ソースコード
package main import . "fmt" import . "math/big" func main() { var n int Scan(&n) p:=NewInt(1) for i:=2;i<=n;i++ { p.Mul(p,NewInt((1<<i)-1)) } p.Mod(p,NewInt((1<<(n+1))-1)) if p.Cmp(NewInt(0))==0 { Println("Yes") } else { Println("No") } }