CSES - Counting Divisor | Đếm ước

View as PDF



Time limit:
Pypy 3 1.5s
Python 3 3.5s

Problem types
Points: 1500 (p) Time limit: 1.0s Memory limit: 512M Input: stdin Output: stdout

Cho \(n\) số nguyên. Với mỗi số, hãy cho biết số lượng ước của nó.

Ví dụ, nếu \(x = 18\), câu trả lời đúng là \(6\) vì các ước của nó là \(1,2,3,6,9,18.\)

Input

  • Dòng đầu tiên chứa một số nguyên \(n\)
  • Sau đó là \(n\) dòng, mỗi dòng chứa một số nguyên \(x\)

Output

  • Đối với mỗi số nguyên, in ra số lượng ước của nó.

Constraints

  • \(1 \leq n \leq 10^5\)
  • \(1 \leq x \leq 10^6\)

Example

Sample input

3
16
17
18

Sample output

5
2
6


Comments

There are no comments at the moment.