We use cookies to ensure you have the best browsing experience on our website. Please read our cookie policy for more information about how we use cookies.
  • Hackerrank Home
  • Prepare
    NEW
  • Certify
  • Compete
  • Career Fair
  • Hiring developers?
  1. Prepare
  2. Mathematics
  3. Fundamentals
  4. Sherlock and Divisors

Sherlock and Divisors

Problem
Submissions
Leaderboard
Discussions
Editorial

Watson gives an integer to Sherlock and asks him: What is the number of divisors of that are divisible by 2?.

Input Format
First line contains , the number of testcases. This is followed by lines each containing an integer .

Output Format
For each testcase, print the required answer in one line.

Constraints

Sample Input

2
9
8

Sample Output

0
3

Explanation
9 has three divisors 1, 3 and 9 none of which is divisible by 2.
8 has four divisors 1,2,4 and 8, out of which three are divisible by 2.

Author

darkshadows

Difficulty

Easy

Max Score

30

Submitted By

21892

Need Help?


View discussions
View editorial
View top submissions

rate this challenge

MORE DETAILS

Download problem statement
Download sample test cases
Suggest Edits

Choose a translation


  • Contest Calendar
  • Blog
  • Scoring
  • Environment
  • FAQ
  • About Us
  • Support
  • Careers
  • Terms Of Service
  • Privacy Policy
  • Request a Feature