Playing With Aladdin

Aladdin is a fictional character and the titular protagonist of Walt Disney Pictures’ 31st animated …

Click here to read the complete problem statement.

If you need help solving this problem, mention your approach and ask specific questions. Please avoid sharing your code and asking the Community to figure out “what’s wrong”.

Like URI ! hahaha!
dont print any extra space ! i think problems are not for learning ! just for making someone fool

1 Like

Wait seriously the constrain is 10^1000. It won’t even fit in 64 bit integer long long… can this problem only be solved in python ? If it can be only solved in python then why there is C++?

Why this submission is showing wrong result