给定一个整数 $n$,对于每个 $k = 0, 1, \dots, 9$,你需要求出满足 $1 \le x, y, z \le n$ 且 $x^{y^z} \equiv k \pmod{10}$ 的整数三元组 $(x, y, z)$ 的数量。
输入格式
输入一个整数 $n$ ($1 \le n \le 10^6$)。
输出格式
输出十个整数,其中第 $i$ 个整数表示 $k = i - 1$ 时的答案。
样例
输入样例 1
2
输出样例 1
0 4 2 0 1 0 1 0 0 0
给定一个整数 $n$,对于每个 $k = 0, 1, \dots, 9$,你需要求出满足 $1 \le x, y, z \le n$ 且 $x^{y^z} \equiv k \pmod{10}$ 的整数三元组 $(x, y, z)$ 的数量。
输入一个整数 $n$ ($1 \le n \le 10^6$)。
输出十个整数,其中第 $i$ 个整数表示 $k = i - 1$ 时的答案。
2
0 4 2 0 1 0 1 0 0 0
The discussion section is only for posting: General Discussions (problem-solving strategies, alternative approaches), and Off-topic conversations.
This is NOT for reporting issues! If you want to report bugs or errors, please use the Issues section below.
If you find any issues with the problem (statement, scoring, time/memory limits, test cases, etc.), you may submit an issue here. A problem moderator will review your issue.
Guidelines: