P28405 [洛谷] "Mathematics" Sum of Divisor Counts
提高+
题目描述

Problem Description

Little F is chatting with his classmates during a math class.

Given a positive integer, calculate the number of its divisors.

"You learn this in competitions? That's too simple."

"……"

Given a positive integer, calculate the sum of the number of divisors of all its divisors.

"Let me think... Hmm, still not hard. Hey, can you still sign up for your competitions?"

"……"

Given a positive integer, calculate the sum of the number of divisors of all the divisors of all its divisors.

"Oh, you can always brute force it with your computers, right? Tell me where to sign up."

"……"

Given a positive integer, calculate the sum of the number of divisors of all the divisors of all the divisors of all its divisors.

"Is this ever going to end?"

"……"

Frustrated by the mockery, Little F hands this problem over to you, asking you to demonstrate your brute force capabilities.

Given a positive integer \( N \), calculate the sum of the number of divisors of \( N \)'s \( ( \)all divisors\( ) \times K \).

The answer might be very large, so output the result modulo \( 998244353 \).

Input Format

Input consists of two integers \( N, K \) on a single line, where \( 1 \leq N \leq 10^{18} \) and \( 0 \leq K \leq 10^{18} \).

Output Format

Output a single non-negative integer, which is the result of the required calculation modulo \( 998244353 \).

Sample Input and Output

Sample Input #1

4 0

Sample Output #1

3

Sample Input #2

4 1

Sample Output #2

6

Sample Input #3

4 2

Sample Output #3

10

Notes

Explanation of Sample 1, 2, 3

\( 4, 0 \): Divisors of \( 4 \) are \( 1, 2, 4 \)

\( 4, 1 \): Divisors of all divisors of \( 4 \) are \( (1), (1, 2), (1, 2, 4) \)

\( 4, 2 \): Divisors of all divisors of all divisors of \( 4 \) are \( ((1)), ((1), (1, 2)), ((1), (1, 2), (1, 2, 4)) \)

Subtasks

Subtask \( 1(11 \text{ pts}) : N, K \leq 10^4 \)

Subtask \( 2(31 \text{ pts}) : N \leq 10^4 \)

Subtask \( 3(41 \text{ pts}) : N \leq 10^9 \)

Subtask \( 4(67 \text{ pts}) : 1 \leq N \leq 10^{18}, 0 \leq K \leq 10^{18} \)

输入格式

见题面 Input 部分

输出格式

见题面 Output 部分

样例输入
4 0
样例输出
3