Description
You are given two positive integers d d d and s s s. Find minimal positive integer n n n which is divisible by d d d and has sum of digits equal to s s s.
Input
The first line contains two positive integers d d d and s s s ( 1 ≤ d ≤ 500 , 1 ≤ s ≤ 5000 ) (1≤d≤500,1≤s≤5000) (1≤d≤500,1≤
Codeforces 1070A Find a Number(BFS) 2018-2019 ICPC, NEERC, Southern Subregional Contest Problem A
最新推荐文章于 2019-08-01 22:09:55 发布