Initialization of answer string


I initialized answer string with all zeros “000…” instead of answer = A, and it failed but changing that to A passes all.
can someone explain?


found it i wasn’t clearing the global variable ans and was just adding ‘0’ characters. if you clear ans each time and then add '0’s it’ll pass.