I was solving the sum MULTHREE

My Code : codechef.com/viewsolution/36118815

I have used `long long`

as well, so why is it showing runtime error? I think my logic is correct, as I tested it with small test-cases and it gave the correct answer.

I was solving the sum MULTHREE

My Code : codechef.com/viewsolution/36118815

I have used `long long`

as well, so why is it showing runtime error? I think my logic is correct, as I tested it with small test-cases and it gave the correct answer.

K can go upto 10^{12}. pow function will return inf when it overflow.

https://en.cppreference.com/w/cpp/numeric/math/pow

Crashes on the sample testcase for me.

```
long long A[k];
```

K can be as large as 10^{12} - how much stack space do you think the Codechef Online Judge has?

1 Like

Anyone?

Cool, so i came up with a code. But it doesn’t work, please can someone help me.

My code : https://www.codechef.com/viewsolution/36125642

@ssjgz

Someone please help me, I’m very anxious to finish the problem.