Prove us Wrong!
Practice
4.5 (2 votes)
Medium
Problem
15% Success 64 Attempts 30 Points 1s Time Limit 256MB Memory 1024 KB Max Code
We don't think you can solve this question. Prove us wrong!
Note: NUmbers with leading zeroes are not considered.
Given a single digit N.
You need to find the smallest number X such that after performing one right circular shift on X, the new number is N times the original number.
Input:
T, the number of test cases.
A single digit N each test case.
1 <= N <= 9
1 <= T <= 9
Output:
The required number X.Note: NUmbers with leading zeroes are not considered.
Submissions
Please login to view your submissions
Similar Problems
1.Good Sum
Points:30
Tags:
C++CountingMathSpecial NumbersCombinatorics
Points:30
7 votes
Tags:
MathematicsMedium
Points:30
2 votes
Tags:
Dynamic ProgrammingCombinatoricsAd-HocMediumAlgorithmsMathematicsOpenApproved
Editorial