Help with the question

In the magical land of Byteland, there are three kinds of citizens:

a Bit - 2ms after a Bit appears, it grows up and becomes a Nibble (i.e. it disappears and a Nibble appears)
a Nibble - 8ms after a Nibble appears, it grows up and becomes a Byte
a Byte - 16ms after a Byte appears, it grows up, splits into two Bits and disappears
Chef wants to know the answer to the following question: what would the population of Byteland be immediately before the time Nms if only 1 Bit appeared at time 0ms?

Help him and find the population (number of citizens) of each type.

Input
The first line of the input contains a single integer T denoting the number of test cases. The description of T test cases follows.
The first and only line of each test case contains a single integer N.
Output
For each test case, print a single line containing three space-separated integers — the number of Bits, Nibbles and Bytes.

Example Input
2
2
3
Example Output
1 0 0
0 1 0
Explanation
Immediately before the time 2ms, there is only one Bit. At 2ms, this Bit grows up, so immediately before 3ms, there is only one Nibble in Byteland.


I'm using the following code and getting wrong answer

t=int(input())
for _ in range(t):
n=int(input())
nb=int(0)
nB=int(0)
nn=int(0)
x = n//26
y = n%26
if y<3:
nb +=1
elif y>2 and y<11:
nn += 1
else:
nB +=1
if x>0:
nb =nb * (x+1)
nB = nB * (x+1)
nn =nn * (x+1)
print(nb,nn,nB)
If this is a Codechef problem, you should know that the Codechef adjudicators are aware of this forum, and that people use it to cheat on their contests. If you use this forum to try and cheat, you run the risk of being disqualified.
Topic archived. No new replies allowed.