結果

問題 No.1800 Random XOR
ユーザー mkawa2mkawa2
提出日時 2022-01-07 21:24:29
言語 PyPy3
(7.3.15)
結果
AC  
実行時間 76 ms / 2,000 ms
コード長 799 bytes
コンパイル時間 446 ms
コンパイル使用メモリ 87,328 KB
実行使用メモリ 71,660 KB
最終ジャッジ日時 2023-08-09 02:59:31
合計ジャッジ時間 2,494 ms
ジャッジサーバーID
(参考情報)
judge14 / judge15
このコードへのチャレンジ(β)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 76 ms
71,328 KB
testcase_01 AC 73 ms
71,392 KB
testcase_02 AC 73 ms
71,524 KB
testcase_03 AC 72 ms
71,548 KB
testcase_04 AC 72 ms
71,384 KB
testcase_05 AC 72 ms
71,660 KB
testcase_06 AC 74 ms
71,360 KB
testcase_07 AC 73 ms
71,416 KB
testcase_08 AC 72 ms
71,240 KB
testcase_09 AC 72 ms
71,360 KB
testcase_10 AC 72 ms
71,632 KB
testcase_11 AC 71 ms
71,336 KB
testcase_12 AC 71 ms
71,344 KB
testcase_13 AC 71 ms
71,448 KB
testcase_14 AC 71 ms
71,392 KB
testcase_15 AC 71 ms
71,588 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

import sys

# sys.setrecursionlimit(200005)
int1 = lambda x: int(x)-1
pDB = lambda *x: print(*x, end="\n", file=sys.stderr)
p2D = lambda x: print(*x, sep="\n", end="\n\n", file=sys.stderr)
def II(): return int(sys.stdin.readline())
def LI(): return list(map(int, sys.stdin.readline().split()))
def LLI(rows_number): return [LI() for _ in range(rows_number)]
def LI1(): return list(map(int1, sys.stdin.readline().split()))
def LLI1(rows_number): return [LI1() for _ in range(rows_number)]
def SI(): return sys.stdin.readline().rstrip()
dij = [(0, 1), (-1, 0), (0, -1), (1, 0)]
# dij = [(0, 1), (-1, 0), (0, -1), (1, 0), (1, 1), (1, -1), (-1, 1), (-1, -1)]
inf = 18446744073709551615
# inf = 4294967295
md = 10**9+7
# md = 998244353

n, m = LI()
ans = (pow(2, m, md)-1)*pow(2, md-2, md)%md
print(ans)
0