結果
問題 | No.1800 Random XOR |
ユーザー |
![]() |
提出日時 | 2022-11-24 18:09:21 |
言語 | PyPy3 (7.3.15) |
結果 |
AC
|
実行時間 | 73 ms / 2,000 ms |
コード長 | 541 bytes |
コンパイル時間 | 151 ms |
コンパイル使用メモリ | 82,188 KB |
実行使用メモリ | 69,056 KB |
最終ジャッジ日時 | 2024-10-01 07:55:29 |
合計ジャッジ時間 | 2,019 ms |
ジャッジサーバーID (参考情報) |
judge1 / judge2 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
sample | AC * 2 |
other | AC * 14 |
ソースコード
from typing import List, Tuple, Callable, TypeVarimport sysimport itertoolsimport heapqimport bisectimport mathfrom collections import deque, defaultdict, Counterfrom functools import lru_cache, cmp_to_keyinput = sys.stdin.readlineif __file__ != 'prog.py':sys.setrecursionlimit(10 ** 6)def readints(): return map(int, input().split())def readlist(): return list(readints())def readstr(): return input()[:-1]N, M = readints()mod = 10 ** 9 + 7p = pow(2, mod - 2, mod)ans = p * (pow(2, M, mod) - 1) % modprint(ans)