No.167 N^M mod 10
問題文最終更新日: 2026-06-25 05:01:52
English (AI translation)
This statement was translated by AI (claude-opus-5-5, effort medium) and may contain errors or differ in nuance from the original. The original statement takes precedence.
Back to the original
yukicoder contest 92
(順位表)
の他の問題:
Problem Statement
Find $N^M mod 10$.
Input
$N$ $M$
$N$ is given on the $1$st line, and $M$ is given on the $2$nd line.
$1 \le N \le 10^{10000}$
$0 \le M \le 10^{10000}$
Output
Output $N^M mod 10$.
Sample
Sample 1
Input
22 22
Output
4
Sample 2
Input
56 65
Output
6
提出するには、Twitter 、GitHub、 Googleもしくは右上の雲マークをクリックしてアカウントを作成してください。