Champernowne Count
시간 제한: 1000ms메모리 제한: 1024MB출처: ICPC Rocky Mountain Regional 2022-2023BOJ 27569
문제
The th Champernowne word is obtained by writing down the first positive integers and concatenating them together. For example, the 10th Champernowne word is "12345678910".
Given two positive integers and , count how many of the first Champernowne words are divisible by .
입력
The single line of input contains two integers, and .
출력
Output a single integer, which is a count of the first Champernowne words divisible by .
예제
예제 1
입력
4 2
출력
2
예제 2
입력
100 7
출력
14
예제 3
입력
314 159
출력
4
예제 4
입력
100000 999809848
출력
1
코드를 제출하려면 로그인하세요.