Playing With Aladdin

Aladdin is a fictional character and the titular protagonist of Walt Disney Pictures’ 31st animated feature film Aladdin (1992) based on Aladdin, a folk tale of Middle Eastern origin. When Aladdin is initially introduced, he is eighteen years old. He never received a formal education, and has only learned by living on the streets of Agrabah. He has to steal food in the local market in order to survive. He was born to Cassim and his wife. When Aladdin was only an infant, his father left him and his mother in order to find a better life for his family.

This is a companion discussion topic for the original entry at

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