Message on Whatsapp 8879355057 for DSA(OA + Interview) + Fullstack Dev Training + 1-1 Personalized Mentoring to get 10+LPA Job
0 like 0 dislike
All past online assesments  of Adobe  can be found using the tag "adobe_oa" in the search bar.

Here is the link :
in Online Assessments by Expert (35,210 points) | 1,824 views

1 Answer

0 like 0 dislike
Problem Statement You have to find the perfect number. Given that it is a positive , with no leading zeros and has exactly x digits in it. Suppose this integer is y if you move the last digit to the front then that integer will be z times of y. So, given integers, x and z find that perfect integer. The perfect integer should be minimum possible value. If an integer that meets this condition is not possible, return '-1'.

Constraints 1<=x<=3*10^4 1<=z<=9

Sample input 6 5

Sample output 142857
by Expert (35,210 points)

Get best answers to any doubt/query/question related to programming , jobs, gate, internships and tech-companies. Feel free to ask a question and you will receive the best advice/suggestion related to anything you ask about software-engineering , development and programming problems .