Sum of QQ
Time limit2sMemory limit512 MB
Count axis-parallel rectangles in the multiplication table whose entries sum to exactly S, with S up to 100000.
- Level
Hard8 of 10
- Topics
- Math, Number theory, Brute force
- Solved
- No attempts yet
Problem
You received a card with an integer on it and a multiplication table of infinite size. Every element of the table is an integer, and the integer in the -th row from the top and the -th column from the left is (). The table is infinite: it has infinitely many rows and infinitely many columns.
You love rectangular regions of the table whose numbers sum to . Your task is to count the number of integer tuples such that , , and .
Input
The input consists of a single test case of the following form.
$S$
The first line contains one integer (), the sum of the rectangular regions you have to find.
Output
Print the number of rectangular regions whose sum is on one line.