Running Correctly on custom input


#1

Its really annoying when your code works fine on a test case and on submitting gives WA.
On test case A = [1,1,1] and B = 2 my code gives correct answer of [1,2] on custom input but gives WA on submitting. Can you please see @abhimanyu @anshumansingh


#2

Ok got it. I need to clear the global variables before using them.