Adobe Online assessment 2022
Anonymous User
1784

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 intgers, x and z find that perfect integer. The perfect integer should be minimum possible value. If an intger that meeths this condition is not possible, return '-1'.

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

Sample input
6
5

Sample output
142857

Comments (4)