Tìm số

View as PDF



Problem type
Points: 10 (p) Time limit: 1.0s Memory limit: 256M Input: stdin Output: stdout

Cho n là 1 số nguyên tố cùng nhau với \(10\). Tìm số bé nhất gồm toàn số 1 và chia hết cho \(n\).

Input

  • Gồm một dòng duy nhất chứa số nguyên dương \(n\) \((n \leq 10^6)\).

Output

  • Gồm một dòng duy nhất chứa số lượng số 1 của số thỏa mãn gồm toàn số 1 và chia hết cho \(n\).

Example

Test 1
Input
37
Output
3

Comments

There are no comments at the moment.