Editorial for COCI '15 Contest 3 #1 Pot


Remember to use this editorial only when stuck, and not to copy-paste code from it. Please be respectful to the problem author and editorialist.
Submitting an official solution before solving the problem yourself is a bannable offence.

First, we need to observe how we can determine the value of an expression base^{pot}. We can determine this by using a predefined function in a programming language of choice (e.g. function pow(base, pot) in Python) or by consecutively multiplying the number base with itself pot times. Another problem is, given P, to determine the value of number (the result of P \bmod 10) and the value of pot (the result of integer division of P by 10).


Comments

There are no comments at the moment.