結果

問題 No.1800 Random XOR
ユーザー bayashi-clbayashi-cl
提出日時 2022-01-07 21:55:08
言語 Python3
(3.11.6 + numpy 1.26.0 + scipy 1.11.3)
結果
AC  
実行時間 32 ms / 2,000 ms
コード長 505 bytes
コンパイル時間 326 ms
コンパイル使用メモリ 10,624 KB
実行使用メモリ 9,768 KB
最終ジャッジ日時 2023-08-09 03:13:50
合計ジャッジ時間 1,793 ms
ジャッジサーバーID
(参考情報)
judge15 / judge13
このコードへのチャレンジ(β)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 30 ms
9,680 KB
testcase_01 AC 30 ms
9,672 KB
testcase_02 AC 30 ms
9,684 KB
testcase_03 AC 30 ms
9,604 KB
testcase_04 AC 30 ms
9,680 KB
testcase_05 AC 30 ms
9,680 KB
testcase_06 AC 30 ms
9,752 KB
testcase_07 AC 32 ms
9,648 KB
testcase_08 AC 31 ms
9,680 KB
testcase_09 AC 30 ms
9,768 KB
testcase_10 AC 30 ms
9,692 KB
testcase_11 AC 30 ms
9,600 KB
testcase_12 AC 30 ms
9,696 KB
testcase_13 AC 30 ms
9,640 KB
testcase_14 AC 30 ms
9,756 KB
testcase_15 AC 31 ms
9,600 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

import functools
import sys
import typing
from typing import Callable, Dict, List, Set, Tuple


sys.setrecursionlimit(10 ** 6)
sinput: Callable[..., str] = sys.stdin.readline
debug = functools.partial(print, file=sys.stderr)
MOD: int = 998244353
INF: float = float("Inf")
IINF: int = sys.maxsize // 2


def main() -> None:
    n, m = map(int, sinput().split())
    MOD = 1000000007
    p = (pow(2, m, MOD) - 1) % MOD
    q = pow(2, -1, MOD)

    print(q * p % MOD)


if __name__ == "__main__":
    main()
0