Rectangles 2
Time limit2sMemory limit512 MB
Count the number of unordered pairs (a, b) of positive integers with a <= b and a*b <= n.
- Level
Medium4 of 10
- Topics
- Math, Number theory, Brute force
- Solved
- No attempts yet
Problem
Byteman has squares with side length (unit squares). Using these squares, how many different rectangles can he build?
Two rectangles are considered different if neither of them can be turned into the other by rotation and translation. While building a rectangle, Byteman may not deform a square, and he may not place any square on top of another.
A rectangle whose sides are positive integers and is made of exactly unit squares, so Byteman can build it only when . A rectangle and the same rectangle rotated by (that is, and ) count as one and the same.
Input
The first and only line of the standard input contains one integer ().
Output
Print a single integer: the number of different rectangles Byteman can build using his squares.
Hint
