P28581 [洛谷] [AHOI2002] Open Sesame
提高-
题目描述

Problem Description

On the weekend, Xiao Keke participates in a quiz show and, after much effort, reaches the final challenge called "Open Sesame." The electronic display on the door reads: "If you can correctly write the sum of all positive divisors of \( n^k \) on the door and say 'Open Sesame,' the door will open freely."

For example, if \( n = 2 \) and \( k = 3 \), then \( n^k = 8 \). Its positive divisors are \( 1, 2, 4, 8 \). If Xiao Keke writes their sum, \( 15 \), on the door and says "Open Sesame," the door will open automatically.

Given that the values of \( n \) and \( k \) on the door change periodically, please write a program to help Xiao Keke calculate the answer within the specified time to win the grand prize of the quiz show.

Input Format

A single line containing two positive integers \( n \) and \( k \).

Output Format

A single line containing one integer representing the answer.

Sample Input and Output

Sample Input #1

1 1

Sample Output #1

1

Sample Input #2

2 2

Sample Output #2

7

Notes

\( 1 \le n \le 2^{16} \), \( 1 \le k < 20 \).

The number of digits in the solution does not exceed 100.

输入格式

见题面 Input 部分

输出格式

见题面 Output 部分

样例输入
1 1
样例输出
1