GO Solution For UVa 10127 - Ones. In this post we will see how we can solve this challenge in GoLang for UVa Online Judge.

Problem Description

Given any integer 0 ≤ n ≤ 10000 not divisible by 2 or 5, some multiple of n is a number which in decimal notation is a sequence of 1’s. How many digits are in the smallest such a multiple of n?

Input A file of integers at one integer per line.

Output Each output line gives the smallest integer x >


You can find the full details of the problem Ones at UVa Online Judge

Sample Input


Sample Output


Solution: Please check the main.go snippet for the solution.

Solution originally posted at: Github by @codingsince1985