Posts by xnor
Python 2, 76 bytes i=27 while~i:print' '*i+' '.join(`min(i,j,27-i-j)`for j in range(28-i));i-=1 Try it online! Computes the digit in row i from the bottom, position j as min(i,j,27-i-j). F...
Haskell, 20 bytes f x=foldl((+).(x*))0 Try it online! Takes input coefficients from highest degree to lowest. 21 bytes x%(h:t)=h+x*x%t x%_=0 Try it online!
Python 3, 35 bytes f=lambda x,i=1:x>0and-~f(x-1/i,i+1) Try it online! Subtracts each 1/i in turn from the initial value until the result is no longer positive.
Haskell, 40 bytes f((h:t):r)=h:f(r++[t]) f(_:r)=f r f _=[] Try it online!
Haskell, 37 bytes f(h:t)=max(1+f[x|x<-t,x>h])$f t f _=0 Try it online!
Python 2, 37 bytes l=input() while 1:print len(l);l=l[0] Try it online! This makes heavy use of programs being allowed to terminate with error, which I assume is allowed by default because ...