#P2480. [SDOI2010] 古代猪文
[SDOI2010] 古代猪文
Description
The civilization of the Pig Kingdom has a long history and great depth.
In the library of Big Fat Pig School, iPig learned from reference materials that the total number of characters in the ancient pig script was . Of course, if a language has many characters, its dictionary will be correspondingly large. The Pig King of that time considered that if a dictionary were compiled, its scale might far exceed the Kangxi Dictionary, and the manpower and material resources required would be immeasurable. After careful consideration, he did not undertake this labor- and resource-intensive project. Naturally, the script of the Pig Kingdom was later simplified over history by removing some uncommon characters.
iPig plans to study the pig script from a certain dynasty in ancient times. According to relevant documents, the characters used in that dynasty happened to be exactly of those in the distant past, where is a positive divisor of (it can be or ). However, exactly which was used, and what was, can no longer be verified due to the remoteness of history.
iPig believes that as long as it matches the documents, every is possible. He will consider all possible . Clearly, when is fixed, the number of characters in that dynasty’s script is . However, the number of ways to retain characters out of is also quite large. iPig estimates that if the total number of cases over all possible sums to , then the cost of his research on the ancient script will be .
He now wants to know the cost for the Pig Kingdom to study the ancient script. Since iPig thinks this number may be astronomical, you only need to tell him the remainder of the answer modulo .
Input Format
One line containing two positive integers .
Output Format
Output one line containing a single integer representing the answer.
4 2
2048
Hint
- Constraints
- For of the testdata, .
- For of the testdata, .
- For of the testdata, .
- For of the testdata, .
Translated by ChatGPT 5
京公网安备 11011102002149号