Help Required Adobe Online Assessment 2022 Perfect Number

Правка en1, от dreamkiller, 2022-06-10 19:34:54

Description

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

Please share your approach for this https://leetcode.com/discuss/interview-question/2108673/Finding-the-perfect-number

История

 
 
 
 
Правки
 
 
  Rev. Язык Кто Когда Δ Комментарий
en1 Английский dreamkiller 2022-06-10 19:34:54 704 Initial revision (published)