Code Submission Evaluation System Login

CSES - HIIT Open 2017

HIIT Open 2017

Contest start:2017-05-27 11:00:00
Contest end:2017-05-27 16:00:00

Task list | Submit code | Submissions | Messages | Scoreboard


History
2017-05-27 12:15:23
2017-05-27 11:08:31
Task:Book writing
Sender:Nää jäbät
Submission time:2017-05-27 12:15:23
Status:READY
Result:ACCEPTED

Show test data

Code

n, m = input().split()
n = int(n)
m = int(m)
print(pow(3, n - 1, m))