Given a number check whether it is a mystery number or not. A mystery number is that number which can be expressed as sum of two numbers and those two numbers should be reverse of each other.
Input : n = 121
Output : 29 92
Input : n = 22
Output : 11 11
Source :Paytm Interview Set 23
The idea is to try every possible pair smaller than or equal to n.
Below is the implementation of above approach.
- Check if the binary representation of a number has equal number of 0s and 1s in blocks
- Check if a number is divisible by all prime divisors of another number
- Check whether all the rotations of a given number is greater than or equal to the given number or not
- Check if a number with even number of digits is palindrome or not
- Program to check whether a number is Proth number or not
- Check Whether a number is Duck Number or not
- Check if a number is an Achilles number or not
- Check if a number is a power of another number
- Check if a number is a Trojan Number
- Check if a number is an Unusual Number or not
- Check if a number is a Krishnamurthy Number or not
- Check if a number is Triperfect Number
- Check whether a number is Non-hypotenuse number
- Check if given number is Emirp Number or not
- Check whether the given number is Euclid Number or not