Partially correct in Chefina and Swap ( September long challenge ) ||please help||

https://www.codechef.com/viewsolution/38006822

try for n=25.

my ans is 0

if n=25 then total sum of all elements = 325 which is odd
as odd can’t be divided into two equal parts answer must be 0?

please help sir

I got your mistake, replace all double with long long, because double will be a problem for bigger numbers like 10^9, n*(n+1) will be of the order 10^18

2 Likes

is long long supports float also

Why do u want float?

finding the ending element of the first group by

quadratic equation formula can give a float value

Ok I have understood it thanks a lot !

https://www.codechef.com/viewsolution/38010806

Ur solution with long long ac on all subtasks

2 Likes

thanks a lot !

I know about long long int data type but can you tell me about long long data type ? please

I have searched it on google but I am not getting precise answer .

is long long just a short form of long long int

1 Like

yes, they are same as far as i have used.

1 Like

Ok thanks ! I pray your goals came true :white_check_mark:

1 Like