Poisioned Sweet
Submissions: 706   Accuracy:


  Difficulty: Easy   Marks: 2

An enemy spy has poisoned one out of N sweets in a bakery. Even a bite of the poisoned sweet has potency to kill. However, the effects of the poison show only in 30 days. The managers asks the jailor to identify the poisoned sweet within 30 days. What is the least number of prisoners the jailor must employ to identify the poisoned sweet?
Note: A sweet can be eaten by any number of prisoners.

The first line of the input contains an integer T, denoting the number of test cases. Then T test cases follow. Each test case consists of a single integer N (Denoting number of total sweets).

Corresponding to each test case, print in a new line the number of the prisoners.

1 ≤ T ≤ 100
1 ≤ N ≤ 104



** For More Input/Output Examples Use 'Expected Output' option **

Contributor: Siddharth Dungarwal
Author: sd5869

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.

Need help with your code? Please use ide.geeksforgeeks.org, generate link and share the link here.

to report an issue on this page.