PHƯỚC HƯNG OJ · THỬ THÁCH THUẬT TOÁN
#GL0000168. Đếm số ước (Counting Divisors)
HỌC THEO LỘ TRÌNH
1 lộ trìnhBài tập thuộc lộ trình
Mục lục đề ⌄
Đang đọc
Đếm số ước (Counting Divisors)
Counting Divisors
Source: CSES
Version: Phuoc Hung OJ Extended
Problem Statement
You are given positive integers. For each value , count the positive integers satisfying . Print an answer for every input value in the same order.
Input
The first line contains . The following lines each contain one integer .
Output
Print lines; line is the number of positive divisors of .
Subtasks
- Subtask 1 (20 points): ; .
- Subtask 2 (30 points): ; .
- Subtask 3 (50 points): ; .
Examples
Input
4
1
16
17
18
Output
1
5
2
6
Explanation
has divisor ; has five divisors ; has ; has .