Bash and a Tough Math Puzzle

Problem Name:
Bash and a Tough Math Puzzle
Site:CodeForces
Links:
Tags: