6616: Small Multiple
时间限制: 1 Sec 内存限制: 512 MB
提交: 345 解决: 28
[提交] [状态] [讨论版] [命题人:admin]
题目描述
Find the smallest possible sum of the digits in the decimal notation of a positive multiple of K.
Constraints
2≤K≤105
K is an integer.
输入
Input is given from Standard Input in the following format:
K
输出
Print the smallest possible sum of the digits in the decimal notation of a positive multiple of K.
样例输入
6
样例输出
3