Number theory problem

Revision en2, by MohamedHassan499, 2019-08-26 06:06:25

Hi everyone,

This problem gives you two inputs N, M and N contains a number like (123) and all what you have to do is to add some digits on the left or the right of the (123) to make it divisible by M Hint about solving this problem, Or a solution for It?

constrains :- N<= 10^12 and M <= 2 * 10^5

Sample tests:-

1 2 ===> 10 2 11 ===> 22 234 823 ===> 12345

problem link: https://www.urionlinejudge.com.br/judge/en/problems/view/2788

And thanks In advance. :)

Tags #number theory, #math

History

 
 
 
 
Revisions
 
 
  Rev. Lang. By When Δ Comment
en3 English MohamedHassan499 2019-08-26 06:07:40 26
en2 English MohamedHassan499 2019-08-26 06:06:25 8
en1 English MohamedHassan499 2019-08-26 06:05:53 516 Initial revision (published)