Answered step by step
Verified Expert Solution
Question
1 Approved Answer
Please write code Petra likes to look at things from all angles. When it comes to numbers, she likes to look at the relationship between
Please write code
Petra likes to look at things from all angles. When it comes to numbers, she likes to look at the relationship between a number and its reverse. The reverse of 135 is 531 . The reverse of 980 is 089 which is actually 89 . The reverse of 5 is 5 . Your job is to find the greatest common factor of an input number and its reverse. Input: Input will consist of an integer N, the number of test cases. The number of test cases will be in range [1,20]. Each subsequent line will contain one integer in the range [1,1000000] representing the number to be tested. Output: Each line of output will consist of one integer representing the greatest common factor of the input with its reverse. Sample input: 5214470036912345 Sample output Step by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started