結果
問題 |
No.1800 Random XOR
|
ユーザー |
![]() |
提出日時 | 2022-02-14 19:52:34 |
言語 | PyPy3 (7.3.15) |
結果 |
WA
|
実行時間 | - |
コード長 | 174 bytes |
コンパイル時間 | 221 ms |
コンパイル使用メモリ | 82,304 KB |
実行使用メモリ | 52,224 KB |
最終ジャッジ日時 | 2024-06-29 06:54:47 |
合計ジャッジ時間 | 1,534 ms |
ジャッジサーバーID (参考情報) |
judge2 / judge3 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
sample | WA * 2 |
other | WA * 14 |
ソースコード
N,M=map(int,input().split()) mod=10**9+7 ans=1 temp=2 M=(M-1)%(mod-1) while M: if M%2: ans=(ans*temp)%mod temp=(temp*temp)%mod M//=2 ans=(ans+mod//2+1)%mod print(ans)