Skip to main content
1 of 3
raznagul
  • 482
  • 3
  • 8

#C#, 165+31=210 bytes

The code requires the following usings:

using System;using System.Linq; 

Here the code:

class P{static void Main(string[]a){var b=ulong.Parse(Console.ReadLine());var c=b;int d=1;for(;c.ToString().Any(x=>x!='0'&&x!='1');d++){c+=b;}Console.WriteLine(d);}} 

Ungolfed:

using System; using System.Linq; class P { static void Main(string[] a) { var b = ulong.Parse(Console.ReadLine()); var c = b; int d = 1; for (; c.ToString().Any(x => x != '0' && x != '1'); d++) { c += b; } Console.WriteLine(d); } } 
raznagul
  • 482
  • 3
  • 8