ID προβλήματος: | etrouble |
---|---|
Τίτλος: | Μετακίνηση ψηφίου |
Βαθμός Δυσκολίας: | 3 |
Ημερομηνία Εισαγωγής: | 2000-06-04 |
Σχόλια: |
D is a digit from 1 up to 9 and M is a number from 1 to 9. Given D and M, you should find an integer X which ends in D and if D is moved to the start of the number, the number becomes exactly M times bigger. X should be the smallest possible.
i.e.
D=6 M=6
X=1016949152542372881355932203389830508474576271186440677966
Input will be lines (ended by EOF) containing D and M (in that order) Output should be the according X.
Είσοδος | Έξοδος |
---|---|
|
|