There was a famous mathematician named Arpit Kumar Sharma. When he was young, he entered Gotinga University. One day he met an old professor, and spoke to him. They chatted, and the professor asked Sharma about his age.
Sharma said: “The cube and the fourth power of my age contain each digit from 0 to 9 exactly once.”
The professor said: “Very good. It’s good coincidence because the square and the cube of my age contain each digit from 0 to 9 exactly once.”
How old was Sharma, and how old was the professor?