Hot answers tagged

6 votes

Print 100 digits of Champernowne's Constant

Jelly,  4 3  2 bytes ³Ṭ A full program that accepts no arguments and prints a list of one hundred consecutive places starting at the 0-indexed index (you may need ...
Jonathan Allan's user avatar
4 votes

Print 100 digits of Champernowne's Constant

C, 41 bytes main(i){for(i=9;i++<59;)printf("%d",i);} Goes through numbers 10 to 59 (indexes 9 to 108), printing exactly 100 digits (without a newline)....
segfaultdev's user avatar
3 votes

Print 100 digits of Champernowne's Constant

Jelly, 6 bytes 2r55DF Try it online! Starts at index 1 (digit 2 in the number 2). Range from 2 to 55 and then the decimal ...
hyper-neutrino's user avatar
  • 41.3k
2 votes

Print 100 digits of Champernowne's Constant

APL (Dyalog Classic), 7 bytes 100⍴'1' Try it online! Prints 1, one hundred times. Similar approach to @Jonathan Allan and others. First appears as ...
Tbw's user avatar
  • 241
2 votes

Print 100 digits of Champernowne's Constant

brainfuck, 23 bytes -[----->+>+<<]>-[->..<] Try it online! Outputs 100 3s, which appears at index ...
m90's user avatar
  • 9,851
1 vote

Print 100 digits of Champernowne's Constant

GolfScript, 6 bytes 55,(;5 Try it online! Prints the first 100 digits. ...
noodle man's user avatar
  • 5,507
1 vote

Print 100 digits of Champernowne's Constant

///, 17 bytes /10/00000001/1100 Try it online! Outputs 98 0s followed by 2 1s, which ...
m90's user avatar
  • 9,851
1 vote

Print 100 digits of Champernowne's Constant

Charcoal, 6 bytes ⭆⁵⁰⁺χι Try it online! Link is to verbose version of code. Starts at index 9. Explanation: Loops over the ...
Neil's user avatar
  • 166k
1 vote

Print 100 digits of Champernowne's Constant

APL+WIN, 11 bytes A function taking no arguments with output from index 1 with index origin = 1 ¯1↓⊃,/⍕¨⍳55 Try it online! Thanks to Dyalog Classic
Graham's user avatar
  • 5,506
1 vote

Shift right by half a bit

JavaScript (Node.js), 31 bytes n=>(g=i=>i*i*2<n*n?g(++i):i)(0) Try it online! or BigInt version, anyway really large values impractical to run Brute-...
l4m2's user avatar
  • 20.7k
1 vote

Shift right by half a bit

Python 3.8 (pre-release), 40 bytes This one works with python integers, giving the correct result even for arbitrarily large integers. Always rounds down. ...
Stef's user avatar
  • 699
1 vote

Is this relationship creepy?

PowerShell, 42 bytes $c={param($a,$b)$a/2+7-gt$b-or$b/2+7-gt$a} Rather than using [math]::min and ...
MarkJustMark's user avatar
1 vote

Even or odd: three player

Perl 5 -p, 49 bytes $_=(0,C,B,A,A..C)[oct"0b".s/./$&%2/ger]||"no one" Try it online! Takes input as ...
Xcali's user avatar
  • 13.4k

Only top scored, non community-wiki answers of a minimum length are eligible