Question: Smallest palindrome You are given an integer N, find the smallest palindromic number of N digits that is divisible by 7 . A palindromic number

 Smallest palindrome You are given an integer N, find the smallest

palindromic number of N digits that is divisible by 7 . A

palindromic number is one which remains the same when its digits are

Smallest palindrome You are given an integer N, find the smallest palindromic number of N digits that is divisible by 7 . A palindromic number is one which remains the same when its digits are reversed. Task Print a single line containing the answer denoting the smallest N digit palindrome divisible by 7. Function description Complete the function solve provided in the editor. This function takes the following parameter and returns the required answer: - N : Represents the number of required digits in the palindrome Input format Note: This is the input format that you must use to provide custom input (available above the Compile and Test button). - The first line contains a single integer T which denotes the number of test cases. T also denotes the number of times you have to run the solve function on a different set of inputs. - For each test case: - The first line contains a single integer N denoting the value of N. Output format Print a single line containing the answer. Constraints 1T101N105 Sample input [ Sample output 231611001 Explanation he first test case - N=3 oproach - 161 is the smallest 3-digit number that is a palindrome and divisible by 7. Thus, it is the

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!