Is there any typical proving method when proving that one problem belongs to class P?
For example, when proving that
The problem of finding n to the kth power is the P problem. (Each multiplication can be done in unit time)
If you present an algorithm that can solve this problem with $O (\log n)$, can it be a proof?