11277: [yosupo] Number Theory - Enumerate Quotients
[Creator : ]
Description
Consider the set of positive integers :
$S=\left\lbrace \left\lfloor \frac{N}{x} \right\rfloor \middle\vert x \in \mathbb{Z} , 1 \leq x \leq N \right\rbrace .$
Output the sequence $(a _ 0, a _ 1 , \ldots , a _ {k-1})$ which is obtained by sorting the elements of $S$ in ascending order.
$S=\left\lbrace \left\lfloor \frac{N}{x} \right\rfloor \middle\vert x \in \mathbb{Z} , 1 \leq x \leq N \right\rbrace .$
Output the sequence $(a _ 0, a _ 1 , \ldots , a _ {k-1})$ which is obtained by sorting the elements of $S$ in ascending order.
Input
$N$
Output
$k$
$a _ 0$ $a _ 1$ $\ldots$ $a _ {k-1}$
$a _ 0$ $a _ 1$ $\ldots$ $a _ {k-1}$
Constraints
$1 \le N \le 10^{12}$
Sample 1 Input
10
Sample 1 Output
5
1 2 3 5 10