Here are my 2 submissions for the problem — https://codeforces.net/contest/1541/problem/B 43140452 -1 243140165 -2
Only difference between the two is the if condition — in first if(l<r and var==(l+r) and in second if(l<r and var%(l+r)==0 and (var/(l+r))==1)
Ideally both should produce same result but on test 103 it is failing - The test 103 is this 1 4 5 2 4 1
its answer should be 1 and indeed its 1 when i run in local or custom invoction but on submit it is giving WA
Can someone pls help why is behaviour?