Skip to main content
added 300 characters in body
Source Link
ovs
  • 61.2k
  • 3
  • 49
  • 164

Python 2, 42 bytes

f=lambda k,n=0:n*(max(`n`)<'2')or f(k,n+k) 

Try it online!


Full program, same length:

a=b=input() while'1'<max(`b`):b+=a print b 

Try it online!

Python 2, 42 bytes

f=lambda k,n=0:n*(max(`n`)<'2')or f(k,n+k) 

Try it online!

Python 2, 42 bytes

f=lambda k,n=0:n*(max(`n`)<'2')or f(k,n+k) 

Try it online!


Full program, same length:

a=b=input() while'1'<max(`b`):b+=a print b 

Try it online!

deleted 72 characters in body; deleted 4 characters in body
Source Link
ovs
  • 61.2k
  • 3
  • 49
  • 164

Python 2, 4642 bytes

f=lambda k,n=0:n*(max(`n`)<n*'1'and n <'2')or f(k,n+k) 

Try it online! fails for testcases 9 and 18 because of maximum recursion depth.Try it online!

Python 2, 46 bytes

f=lambda k,n=0:max(`n`)<n*'1'and n or f(k,n+k) 

Try it online! fails for testcases 9 and 18 because of maximum recursion depth.

Python 2, 42 bytes

f=lambda k,n=0:n*(max(`n`)<'2')or f(k,n+k) 

Try it online!

Source Link
ovs
  • 61.2k
  • 3
  • 49
  • 164

Python 2, 46 bytes

f=lambda k,n=0:max(`n`)<n*'1'and n or f(k,n+k) 

Try it online! fails for testcases 9 and 18 because of maximum recursion depth.