FOOLS18C-Editorial

PROBLEM LINK:

Practice

Contest

Author: Aman Shahi

Tester: Aman Mehta

First One To Solve: Tautvydas Jasiunas

DIFFICULTY:

Special Problem : Easy-Medium

PROBLEM:

He Knew Infinity.

There are many ways to solve the question, you need check if 2-way solution exists.

HINTS:

This problem is to find whether given number is a Hardy Ramanujan number or not.
The title of the question hints towards famous hollywood movie “The Man Who Knew Infinity” which was based on the life of great mathematician Srinivasa Ramanujan. Next thing one should have figured out is that if a number is two-way Hardy-Ramanujam number or not.
2-way solution

SOLUTION

here