{.passc: "-std=gnu++17 -Wall -Wextra -O2 -DONLINE_JUDGE -I/opt/boost/gcc/include -L/opt/boost/gcc/lib -I/opt/ac-library".} {.optimization:speed,optimization:size,warnings: off,hints: off.} import strformat,macros,std/algorithm,tables,sets,lists,intsets,critbits,sequtils,strutils,std/math,sugar,options,bitops,heapqueue,std/deques proc g():string=stdin.readLine proc gin():int=g().parseInt proc gInts(): seq[int] = g().split.map(parseInt) proc gIntsNs(n:int): seq[seq[int]] = result=newSeq[seq[int]](n) for i in 0..n-1:result[i]=gInts() proc powMod*(a, b, c: int): int {.importcpp: "atcoder::pow_mod(#, @)", header: "".} #=========================================================================== proc main(){.inline.}= var a,n:int (a,n) = gInts() var m = 10000000 echo m echo powMod(a, n, m) when isMainModule: main()