#abc370g. G - Divisible by 3

G - Divisible by 3

Score : 650650 points

问题陈述

我们称一个正整数 nn 为好整数,当且仅当它的正除数之和能被 33 整除。 给定两个正整数 NNMM。找出长度为 MM 的正整数序列 AA 的数量,模 998244353998244353,使得 AA 中元素的乘积是一个不超过 NN 的好整数。

以上为大语言模型 kimi 翻译,仅供参考。

Problem Statement

We call a positive integer nn a good integer if and only if the sum of its positive divisors is divisible by 33.
You are given two positive integers NN and MM. Find the number, modulo 998244353998244353, of length-MM sequences AA of positive integers such that the product of the elements in AA is a good integer not exceeding NN.

Constraints

  • 1N10101 \leq N \leq 10^{10}
  • 1M1051 \leq M \leq 10^5
  • NN and MM are integers.

Input

The input is given from Standard Input in the following format:

NN MM

Output

Print the answer.

Sample Input 1

10 1

Sample Output 1

5

There are five sequences that satisfy the conditions:

  • (2)(2)
  • (5)(5)
  • (6)(6)
  • (8)(8)
  • (10)(10)

Sample Input 2

4 2

Sample Output 2

2

There are two sequences that satisfy the conditions:

  • (1,2)(1, 2)
  • (2,1)(2, 1)

Sample Input 3

370 907

Sample Output 3

221764640

Sample Input 4

10000000000 100000

Sample Output 4

447456146