#A. 数学题

    Type: Default 20ms 10MiB

数学题

You cannot submit for this problem because the contest is ended. You can click "Open in Problem Set" to view this problem in normal mode.

Background

  • zzz给uuu出了道题:
  • { 给你a,b,c,d,p,请求出
  • (abcd) Mod p(\dfrac{a^b}{c^d}) \ Mod \ p
  • 假设一定能整除。}
  • uuu才学了亿天编程,他一看就懵(hui)了,你能帮他回答出来吗?

Format

Input

a,b,c,d,p

Output

ans

Samples

9 2 3 2 5
4

Limitation

1s, 1024KiB for each test case.1a,b,c,d,p109,GCD(c,p)=11≤a,b,c,d,p≤10^9, GCD(c, p) = 1,p是质数,注意时限20ms,std的10倍

考验

Not Attended
Status
Done
Rule
ACM/ICPC
Problem
4
Start at
2022-11-12 10:45
End at
2022-12-19 22:45
Duration
900 hour(s)
Host
Partic.
6