Works fine when run as custom input but gives error on submitting for A=1


#1

I tried in both python and C++, the bug was adding equal to sign in both the conditions of loop but it is still giving incorrect answer.