N^A ≡ N ( mod B )

2 secs 1024 MB
Izayoi_R's icon Izayoi_R

testcase-10.txt


入力

出力