Arrange the Bricks!

You have $N$ bricks two dimensional bricks of the dimension $1 \times 2$. The bricks are rotatable i…

Click here to read the complete problem statement.


If you need help solving this problem, mention your approach and ask specific questions. Please avoid sharing your code and asking the Community to figure out “what’s wrong”.

How do i know that i can arrang n bricjs in some x way??
Why 4 bricks would arrang in 2 ways???

@hjr265 is there any problem in test cases or in my code? Please notify me. there is also submissions like mine’s and got AC while I am stuck in test case 3.

1 Like

@hjr265 I am not asking for any hints. I just want to know if the test cases are okay or my code.

1 Like

Let me check and get back to you soon.

Test cases are fine. I have added Scanspec to this problem. All test cases match the given specification.

And, judge solutions still work.

It seems you already solved this problem a while ago. But your latest submission is not passing. I re-ran your accepted solution, and it still passes. I re-ran your latest solution, and it still yields Wrong Answer.

You may want to check what you did different between the two submissions.

test_cases = int(input())
for i in range(test_cases):
    b = int(input())
    area = b*2
    divisors = []
    for x in range(1,area+1):
        if(area%x==0):
            divisors.append(x)
    print((len(divisors)+1)//2)

It’s showing CPU limits exceeded in the 3rd case. Can someone pls help me with my solution…