正整數的冪次


提交程序

分数: 100 (部分)
时间限制: 3.0s
内存限制: 256M

作者:
题目类型

想必大家都知道 24=42,32=91,36=272 等正整數的冪次之間相等的關係。你有沒有想過底數和指數在某個範圍以內的正整數冪次到底有幾種呢?

給定正整數 n,m,定義集合 S={xy | x,yN,1xn,1ym}

問題很簡單,請計算 |S|mod998244353

Input

輸入只有一行,這行輸入兩個正整數 n,m (1n,m1014)

Output

輸出一個整數,代表 |S|mod998244353

Constraints

1 組測資:1n,m10。(1%)

2 組測資:1n,m500。(7%)

3 組測資:1n,m106。(22%)

4 組測資:1n106。(43%)

5 組測資:無特別限制。(27%)

Sample Input 1
Copy
4 4
Sample Output 1
Copy
11
Sample Input 2
Copy
48763 45510
Sample Output 2
Copy
216698900

评论

目前没有评论。