Need help in a problem

Revision en1, by __Nutella__, 2022-04-08 06:08:32

Ques.

Find the min. Number whose sum of digits is k and the number should be divisible by f. Since number can be large return output as string. Return -1 if no such number exist.

f < 500 k < 5000

History

 
 
 
 
Revisions
 
 
  Rev. Lang. By When Δ Comment
en1 English __Nutella__ 2022-04-08 06:08:32 226 Initial revision (published)