Skip to main content
deleted 2 characters in body
Source Link
beary605
  • 4.4k
  • 2
  • 27
  • 53

Python (136 133 9896)

The standard method for continued fractions, extremely golfed.

a=input()**.5 D=intD=c=int(a);c=D;b=[];b=[] while c!=D*2:a=1/(a%1);c=int(a);b+=[c] print D,";%s;"%str(b)[1:-1] 

Python (136 133 98)

The standard method for continued fractions, extremely golfed.

a=input()**.5 D=int(a);c=D;b=[] while c!=D*2:a=1/(a%1);c=int(a);b+=[c] print D,";%s;"%str(b)[1:-1] 

Python (136 133 96)

The standard method for continued fractions, extremely golfed.

a=input()**.5 D=c=int(a);b=[] while c!=D*2:a=1/(a%1);c=int(a);b+=[c] print D,";%s;"%str(b)[1:-1] 
Fixed my code, compressing it even more!
Source Link
beary605
  • 4.4k
  • 2
  • 27
  • 53

Python (136 133 13398)

The standard method for continued fractions, extremely golfed.

a=input()**.5 D=int(a);b=[];d=0;c=D;b=[] while Truec!=D*2: a=1/(a%1) b+=[int;c=int(a)] d+=1 c=b[:d/2];b+=[c]  if c==b[d/2:]:print D,";%s;"%str(cb)[1:-1];break1] 

Python (136 133)

The standard method for continued fractions, extremely golfed.

a=input()**.5 D=int(a);b=[];d=0 while True: a=1/(a%1) b+=[int(a)] d+=1 c=b[:d/2]  if c==b[d/2:]:print D,";%s;"%str(c)[1:-1];break 

Python (136 133 98)

The standard method for continued fractions, extremely golfed.

a=input()**.5 D=int(a);c=D;b=[] while c!=D*2:a=1/(a%1);c=int(a);b+=[c] print D,";%s;"%str(b)[1:-1] 
added 72 characters in body
Source Link
beary605
  • 4.4k
  • 2
  • 27
  • 53

Python (136136 133)

The standard method for continued fractions, extremely golfed.

a=input()**.5 D=int(a);b=[];d=0 while True: a=1/(a%1) b+=[int(a)] d+=1 c=b[:d/2] if c==b[d/2:]:print"%d;%s;"%(print D,str";%s;"%str(c)[1:-1]);break1];break 

Python (136)

a=input()**.5 D=int(a);b=[];d=0 while True: a=1/(a%1) b+=[int(a)] d+=1 c=b[:d/2] if c==b[d/2:]:print"%d;%s;"%(D,str(c)[1:-1]);break 

Python (136 133)

The standard method for continued fractions, extremely golfed.

a=input()**.5 D=int(a);b=[];d=0 while True: a=1/(a%1) b+=[int(a)] d+=1 c=b[:d/2] if c==b[d/2:]:print D,";%s;"%str(c)[1:-1];break 
Source Link
beary605
  • 4.4k
  • 2
  • 27
  • 53
Loading