Hi can you tell why 1ST TEST CASE is NOT SATISFYING
1ST TEST CASE NOT SATISFYING
@Prakhar_Nagpal print every output in new line
after displaying current answer cout<<endl before going to new testcase
i hope its cleared if yes dont forget to hit like and mark resolved 
you mean that i should print every digit in separate line