시간 제한 | 메모리 제한 | 제출 | 정답 | 맞힌 사람 | 정답 비율 |
---|---|---|---|---|---|
1 초 | 1024 MB | 6 | 6 | 6 | 100.000% |
The $n$th Champernowne word is obtained by writing down the first $n$ positive integers and concatenating them together. For example, the 10th Champernowne word is "12345678910".
Given two positive integers $n$ and $k$, count how many of the first $n$ Champernowne words are divisible by $k$.
The single line of input contains two integers, $n$ $(1 \le n \le 10^5)$ and $k$ $(1 \le k \le 10^9)$.
Output a single integer, which is a count of the first $n$ Champernowne words divisible by $k$.
4 2
2
100 7
14
314 159
4
100000 999809848
1
ICPC > Regionals > North America > Mid-Central Regional > 2022 Mid-Central USA Regional Contest D번
ICPC > Regionals > North America > Pacific Northwest Regional > 2022 ICPC Pacific Northwest Region > Division 1 C번
ICPC > Regionals > North America > Pacific Northwest Regional > 2022 ICPC Pacific Northwest Region > Division 2 C번
ICPC > Regionals > North America > Rocky Mountain Regional > 2022 Rocky Mountain Regional Contest C번