Back
Close

Kaci and divisors

Statement

 Goal

Salim is in a hurry and gives a list of T integers to Kaci and asks him: How many divisors of each integer are divisible by 2? Quickly please!
Input
First line contains T, the number of integers. Followed by T lines each containing an integer N.
Output
T lines. For each integer N, print the number of divisors that are divisible by 2.
Constraints
1<=T<=100
1<=N<=10^9
Example
Input
3
9
1
8
Output
0
0
3

Game modes
Fastest, Shortest

Test cases
Test 1 Test
Input
3 9 1 8
Output
0 0 3

Validator 1 Validator
Input
9 1 2 3 4 5 6 7 8 9
Output
0 1 0 2 0 2 0 3 0

Test 2 Test
Input
18 158260522 877914575 602436426 24979445 861648772 623690081 433933447 476190629 262703497 211047202 971407775 628894325 731963982 822804784 450968417 430302156 982631932 161735902
Output
8 0 8 0 16 0 0 0 0 4 0 0 8 8 0 32 8 2

Validator 2 Validator
Input
18 2 4 8 16 32 64 128 256 512 1024 2048 4096 8192 16384 32768 65536 131072 262144
Output
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18

Test 3 Test
Input
18 221614680 613118744 825161854 393619966 433416647 918290125 875590062 364287285 540653024 282896407 834916465 819950927 260491958 606161260 616177142 575204996 709562762 710833433
Output
48 24 4 2 0 0 8 0 20 0 0 0 2 16 8 8 4 0

Validator 3 Validator
Input
18 506764302 829009274 194914087 900107191 792346840 947871939 258166732 57187588 273566703 239091933 42779310 878945781 166080323 844037944 739339985 117486555 829841777 569097293
Output
32 2 0 0 24 0 8 4 0 0 64 0 0 6 0 0 0 0

Test 4 Test
Input
19 2 1458 2916 5832 11664 23328 46656 93312 186624 373248 746496 1492992 2985984 5971968 11943936 23887872 47775744 95551488 191102976
Output
1 7 14 21 28 35 42 49 56 63 70 77 84 91 98 105 112 119 126

Validator 4 Validator
Input
4 2 4 8 16
Output
1 2 3 4

Solution language

Solution

Stub generator input