mirror of
https://github.com/renbaoshuo/202401-programming-assignments.git
synced 2024-11-27 02:25:37 +00:00
22 lines
313 B
C
22 lines
313 B
C
#include <stdio.h>
|
|
|
|
int main() {
|
|
int n, k, ans = 0;
|
|
|
|
scanf("%d%d", &n, &k);
|
|
|
|
for (int i = 1; i <= n; i++) {
|
|
int tmp = 1;
|
|
|
|
for (int j = 1; j <= k; j++) {
|
|
tmp = tmp * i % 114514;
|
|
}
|
|
|
|
ans = (ans + tmp) % 114514;
|
|
}
|
|
|
|
printf("%d\n", ans);
|
|
|
|
return 0;
|
|
}
|