結果

問題 No.251 大きな桁の復習問題(1)
ユーザー vwxyzvwxyz
提出日時 2021-08-01 16:57:14
言語 PyPy3
(7.3.15)
結果
WA  
実行時間 -
コード長 775 bytes
コンパイル時間 326 ms
コンパイル使用メモリ 86,924 KB
実行使用メモリ 95,492 KB
最終ジャッジ日時 2023-10-14 18:49:40
合計ジャッジ時間 8,670 ms
ジャッジサーバーID
(参考情報)
judge12 / judge15
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 270 ms
91,648 KB
testcase_01 WA -
testcase_02 AC 270 ms
91,260 KB
testcase_03 AC 266 ms
91,648 KB
testcase_04 AC 263 ms
91,748 KB
testcase_05 AC 266 ms
91,620 KB
testcase_06 AC 271 ms
91,524 KB
testcase_07 AC 274 ms
91,456 KB
testcase_08 AC 270 ms
91,516 KB
testcase_09 RE -
testcase_10 RE -
testcase_11 RE -
testcase_12 RE -
testcase_13 RE -
testcase_14 RE -
testcase_15 RE -
testcase_16 RE -
testcase_17 RE -
testcase_18 RE -
testcase_19 RE -
testcase_20 AC 279 ms
91,384 KB
testcase_21 AC 281 ms
91,820 KB
testcase_22 AC 277 ms
91,504 KB
testcase_23 AC 278 ms
91,584 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

import bisect
import copy
import decimal
import fractions
import heapq
import itertools
import math
import random
import sys
from collections import Counter,deque,defaultdict
from functools import lru_cache,reduce
from heapq import heappush,heappop,heapify,heappushpop,_heappop_max,_heapify_max
def _heappush_max(heap,item):
    heap.append(item)
    heapq._siftdown_max(heap, 0, len(heap)-1)
def _heappushpop_max(heap, item):
    if heap and item < heap[0]:
        item, heap[0] = heap[0], item
        heapq._siftup_max(heap, 0)
    return item
from math import gcd as GCD, modf
read=sys.stdin.read
readline=sys.stdin.readline
readlines=sys.stdin.readlines

N,M=map(int,read().split())
mod=129402307
N%=mod
M%=mod-1
if N==M:
    ans=0
else:
    ans=pow(N,M,mod)
print(ans)
0