Classic
Clean & simple
Crystal
Glassmorphism + Neon
Cyberpunk
Neon glitch art
🚫
违规Action检测
禁止Use右键菜单
⚠️ 此Action已被系统记录
1

MiaoWu's Function

📝 Solutions 🔵 仅限 C++
Problems Description
Given n,k and the function f(n,k) = 1^k + 2^k + ... + n^k , you're supposed to calculate it.
Input格式
<p> Multiple test cases. </p> <p> Each line contains two numbers n,k(1&lt;=n,k&lt;=10^9) </p>
Output格式
Output the last digit of the function f(n,k)
Sample
Sample Input 1
1 1 8 4 2 5 3 2 5 2 8 3 2 4
Sample Output 1
1 2 3 4 5 6 7
Submit Code
请先Login后Submit

🤖 AI 解题助手

OpenRouter
就绪
👋 你好!我是 AI 解题助手。
我已阅读了这problems题,可以帮你points析思路、提供Code示例。
🔓 完全Free · 无需消耗 Token