# MSNG HELP REQUIRED

Can somebody please explain why both of these solutions for problem MSNG are not working

I brainstormed a lot but couldnt find where it fails. Looks like the same error on both the codes.
PS. the approach used in both the codes is different

Similar to your’s.
https://www.codechef.com/viewsolution/27209017

Hi @ashish_arora , What do you think should be the output for the the test case below?
1
2
-1 10000
-1 121
There are two possibilities, 16 and 256 . Your code is giving the output 256. Is it mentioned anywhere about what is the accepted answer if multiple answers are possible as above?
Even I have problem with the acceptance of the same problem. Please help me with it https://www.codechef.com/viewsolution/27365264 .

@ashish_arora Hi, it is there in the problem statement " Your task is to find the smallest common number XX that satisfies all conditions, or determine that no such common number exists." . So it should return 16

https://www.codechef.com/viewsolution/27360516 this does return 16

Answer should be 16 as it was minimum when compared b/w 16 and 256

https://www.codechef.com/viewsolution/27288668

I am also stuck

yes, it does return 16

Dude, I got you
Consider Testcase :
1
-1 000(any no of zeros)(except 1 zero)
ans has to be zero.
Your code(both of them) is printing -1.

can someone help me to find out where my solution is failing for 2nd subtask:
my solution can be seen at.
https://www.codechef.com/viewsolution/27363695

thanks

1
1
-1 Z0000000000000

test case gives answer as “False”. i think it should be -1

It is said in the comments section that redundant zeroes are not present in test cases

oh i see,[20 char limit]

Multiple zeroes is probably not a valid test case

I even read the editorial but still cannot figure out where it is failing.

For some of the cases its printing false instead of -1

https://www.codechef.com/viewsolution/27384283

still getting WA

Can You explain me your code?

Which Of the two approaches do you want me to explain to you !?