Have you played the game Spot it!? Though there are many ways to play this game, the basic rule is the same for all - find the matching element between two cards.
In a classic deck of Spot it! there are 55 cards, each containing 8 different symbols. And there is a very interesting property. Any 2 cards have exactly one symbol in common.
This makes many people wonder: how many symbols are sufficient to make those 55 cards?
Let us be more generic and find out:
How many symbols are sufficient to make a deck of N cards?
So that in a deck of N cards:
$1 \le T \le 100$) denoting the number of test cases to follow.
Each of the next T lines will have an integer
$1 \le N \le 10^4$).
For each test case, print the minimum number of symbols required in a new line.
2 6 30