PHƯỚC HƯNG OJ · THỬ THÁCH THUẬT TOÁN

#GL0000168. Đếm số ước (Counting Divisors)

HỌC THEO LỘ TRÌNH

Bài tập thuộc lộ trình

1 lộ trình

Đếm số ước (Counting Divisors)

Counting Divisors

Source: CSES

Version: Phuoc Hung OJ Extended

Problem Statement

You are given nn positive integers. For each value xix_i, count the positive integers dd satisfying xi mod d=0x_i\bmod d=0. Print an answer for every input value in the same order.

Input

The first line contains nn. The following nn lines each contain one integer xix_i.

Output

Print nn lines; line ii is the number of positive divisors of xix_i.

Subtasks

  • Subtask 1 (20 points): 1≤n≤1001 \le n \le 100; 1≤xi≤1031 \le x_i \le 10^3.
  • Subtask 2 (30 points): 1≤n≤50001 \le n \le 5000; 1≤xi≤1051 \le x_i \le 10^5.
  • Subtask 3 (50 points): 1≤n≤1051 \le n \le 10^5; 1≤xi≤1061 \le x_i \le 10^6.

Examples

Input

4
1
16
17
18

Output

1
5
2
6

Explanation

11 has divisor 11; 1616 has five divisors 1,2,4,8,161,2,4,8,16; 1717 has 1,171,17; 1818 has 1,2,3,6,9,181,2,3,6,9,18.