Hey Friends,

I am little newbie here, but have good understanding of Data Structures…

Question: XLSQUARE

I have seen people have implemented solution like, take square-root of n, and then multiply that by a,

but I used another logic like this code, and was able to pass given testcases, but got WA after submission,

```
int remainder = 0;
if (n % 4 != 0)
remainder++;
res = (n / 4) * a + remainder * a;
System.out.print(res);
```

what I was missing here or how can I make this code work?

Question Link: Contest Page | CodeChef

My Solution link: Solution: 49962596 | CodeChef