Let's consider the following manipulation. We start at n = 12. The square of 12 is 144.…
Jump to turn (7)
- 1Let's consider the following manipulation. We start at n = 12. The square of 12
- 2Your friend Alice wants to play the piano but finds it difficult to learn chords
- 3You must output the degree in Celsius if degree is odd otherwise in Fahrenheit,
- 4Here is the trick to check - without a calculator - if a number is divisible by
- 5Given the sum s of four positive integer variables a + b + c + d, compute the ma
- 6The game mode is REVERSE: You do not have access to the statement. You have to g
- 7You are given two integers, N and X. N represents the price of an investment, an
- User
Let's consider the following manipulation. We start at n = 12. The square of 12 is 144. Reversing the digits of 144 we obtain 441. The square root of 441, m = 21, is, in this example, also an integer.
If the previous manipulation starting at an integer n yields another integer m, then we say that (n, m) is a perfect pair. For example, (12, 21) is a perfect pair.
You will be given a number n and you have to assess if it is the left element of a perfect pair. If it is, give the right member of the pair. If it isn't, output None. Input Line 1: A positive integer n. Output An integer m such that (n, m) is a perfect pair. If there isn't such m, the string None. Constraints 1 <= n <= 10 ** 6 Example Input 12 Output 21 ... Please solve with C# code.
- Assistant