Two friends are playing a game. One gives an integer **N** to other and asks: What is the number of divisors of N that are divisible by 3? The task is to help the other friend in finding the number of divisors.

**Input:**

The first line of input contains an integer **T** denoting the number of test cases.For each test case there will be single line which contains an integer N.

**Output:**

For each test case in a new line print the number of divisors.

**Constraints:**

1 ≤ T ≤ 50

1 ≤ N ≤ 100000

**Example:**

**Input:**

2

6

10

**Output:**

2

0

**Explanation:**

6 has three divisors 1, 3 and 6 out of which two are divisible by 3.

10 has four divisors 1,2,5 and 10 none of which is divisible by 3

Author: karanshrm44

If you have purchased any course from GeeksforGeeks then please ask your doubt on course discussion forum. You will get quick replies from GFG Moderators there.

thanuvinu94 | 425 |

the_coder95 | 380 |

RishabhTanwar1 | 280 |

shubham3174 | 208 |

RitikRosan | 202 |

the_coder95 | 1226 |

RishabhTanwar1 | 1000 |

thanuvinu94 | 634 |

tathagat289 | 628 |

themanhasnoname | 620 |

blackshadows | 5331 |

Ibrahim Nash | 5219 |

akhayrutdinov | 5111 |

mb1973 | 4885 |

Quandray | 4547 |

Login to report an issue on this page.