Find the number in the Champernowne constant

LabVIEW, 29 LabVIEW Primitives

This uses strings for now. It matches the input as a pattern and outputs the offset - (input lenght -1).


Pyth, 10

hxjkS+QT`Q

Concatenates first input + 10 numbers then finds the 0 based index plus one.. The extra ten are only needed for 0.

Test Suite


Javascript, 57 bytes

a=prompt();for(y=b=" ";y<a+11;)b+=++y;alert(b.indexOf(a))

Saved 1 byte thanks to Conor O'Brien.