An interesting problem that was asked in online hiring test of salesforce.

Правка en1, от randomrandom1810, 2022-06-16 13:32:03

We are provided with 2 integers, F and K and we want to find an integer N such that

  • N is minimum number which is divisible by F
  • N is minimum number whose sum of digits is an integer K return minimum N satisfying the 2 conditions.

constraints

1 <= F <= 495 1 <= K <= 5000

Please tell me how to approach this problem.

Теги problem, math

История

 
 
 
 
Правки
 
 
  Rev. Язык Кто Когда Δ Комментарий
en3 Английский randomrandom1810 2022-06-16 14:32:31 4
en2 Английский randomrandom1810 2022-06-16 14:29:04 32
en1 Английский randomrandom1810 2022-06-16 13:32:03 410 Initial revision (published)