Here are my 2 submissions for the problem — https://codeforces.net/contest/1541/problem/B
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
n=4 a=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 answer 2 hence WA
Can someone pls help why is behaviour?