# Arrange the Bricks!

You have $N$ bricks two dimensional bricks of the dimension $1 \times 2$. The bricks are rotatable i.e. you can turn the brick of dimension $1 \times 2$ into $2 \times 1$. Now, you have to determine how many different rectangular shapes can you create by arranging the bricks. Two rectangular shapes are different if their dimensions are different. There should be no space left in the rectangular shapes that you create with the bricks i.e they must be filled with bricks.

This is a companion discussion topic for the original entry at https://toph.co/p/arrange-the-bricks

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…