Help me in solving BADMINTON problem

My issue

I able to connect the logic but, un-able to configure the output properly what was issue?

My code

# cook your dish here
t = int(input())
for _ in range(t):
    p = int(input())
    count = 0
    for i in range(0,p):
        # count = 0
        if i%2==0:
            count +=1

Problem Link: BADMINTON Problem - CodeChef

u can’t loop it through bcozz of high constraints so just use maths print (p+2)/2;

1 Like