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

can any one tell what is the error in my code…

according to tester solution …for input 3 3 6 8

answer 38…

but according to my code answer should be 40…

we can place like that…

8 0 8

0 8 0

8 0 8

1 Like

here x=6 so it includes number between only 0 to 6 so u cannot write 8 here tester has taken 6 and 2 so

6 2 6

2 6 2

6 2 6

@brijesh_989

thnx bro… i just forgot …to check this

1 Like