Skip to main content
71 votes

Fibonacci-orial

Mathematica, 10 bytes Fibonorial Another Mathematica built-in soundly beaten by a golfing language without the built-in.
Martin Ender's user avatar
37 votes

Extreme Fibonacci

Python 2 + sympy, 72 bytes from sympy import* n=sqrt(5) print'7'+`((.5+n/2)**1e9/n).evalf(1e3)`[2:] Try it online! -10 bytes by removing the practically-0 term ...
hyper-neutrino's user avatar
  • 42.4k
36 votes

Extreme Fibonacci

Python 2, 106 bytes a,b=0,1 for c in bin(10**9): a,b=2*a*b-a*a,a*a+b*b if'1'==c:a,b=b,a+b while a>>3340:a/=10;b/=10 print a Try it online! No libraries,...
xnor's user avatar
  • 145k
33 votes

Extreme Fibonacci

x86 32-bit machine code (with Linux system calls): 106 105 bytes changelog: saved a byte in the fast version because an off-by-one constant doesn't change the result for Fib(1G). Or 102 bytes for an ...
Peter Cordes's user avatar
  • 4,837
28 votes

Fibonacci-orial

Jelly, 6 bytes +С1ḊP Input 100 finishes in 500 ms locally. Try it online! How it works ...
Dennis's user avatar
  • 210k
28 votes

11 = (1+2+3+4+5) - (1+2+3) + (6) - (4)

Mathematica, 79 bytes Min[2#/(d=Divisors@#~Cases~_?OddQ)+d]-2⌊(2#)^.5+.5⌋+⌈Sqrt[8#+1]~Mod~1⌉& Explanation I couldn't be bothered to implement the algorithm ...
Martin Ender's user avatar
22 votes

Find the Factorial!

Mornington Crescent, 1827 1698 chars I felt like learning a new language today, and this is what I landed on... (Why do I do this to myself?) This entry won't be winning any prizes, but it beats all ...
Alevya's user avatar
  • 401
22 votes

Extreme Fibonacci

Haskell, 83 61 bytes p(a,b)(c,d)=(a*d+b*c-a*c,a*c+b*d) t g=g.g.g t(t$t=<<t.p)(1,1) Outputs (F1000000000,F1000000001). On my laptop, it correctly prints ...
Anders Kaseorg's user avatar
21 votes

Fibonacci-orial

Actually, 4 bytes Runs the input 100 within 0.2 seconds. Code: R♂Fπ Explanation: ...
Adnan's user avatar
  • 44.4k
21 votes

Fibonacci-orial

Brainfuck, 1198 1067 817 770 741 657 611 603 ...
primo's user avatar
  • 33.3k
20 votes

Counting creatures on a hexagonal tiling

JavaScript (Node.js),  578 ... 433  431 bytes ...
Arnauld's user avatar
  • 193k
18 votes

Plight of the Concorde

88 Cities, 341 seconds runtime on NEOS In a recent paper we constructed a family of hard to solve euclidean TSP instances. You can download the instances from this family as well as code for ...
Stefan Hougardy's user avatar
18 votes

Solve Rubik's Clock

05AB1E, 203 202 193 192 bytes ...
Kevin Cruijssen's user avatar
16 votes
Accepted

Compute the inverse of an integer modulo 100000000003

Pyth, 24 bytes L-b*/bJ+3^T11Jy*uy^GT11Q Test suite This uses the fact that a^(p-2) mod p = a^-1 mod p. First, I manually reimplement modulus, for the specific ...
isaacg's user avatar
  • 42k
16 votes

Count forth and back then double up

JavaScript (ES7),  59 ... 44  43 bytes Saved 1 byte thanks to Titus Expected input: 1-indexed. n=>(n-=(r=(~-n/2)**.5|0)*r*2)<++r*2?n:r*4-n Initially inspired ...
Arnauld's user avatar
  • 193k
15 votes

How should I tile my kitchen?

APL (Dyalog Unicode), 193 bytes ...
Bubbler's user avatar
  • 77k
15 votes

Fibonacci-orial

Python, 45 Bytes a=b=o=1 exec"o*=a;a,b=b,a+b;"*input() print o Input is taken from stdin. Output for n = 100 finishes too quickly to accurately time. n = 1000 ...
primo's user avatar
  • 33.3k
15 votes

Piet (Mondrian)'s Puzzle

Piet, 9625 (It finally works!) The people demanded it, so here it is. This is an extremely naive solution (essentially the same as the loose upper bounds on the OEIS page): it divides each square ...
Tim Pederick's user avatar
  • 1,721
15 votes

When does hh:mm = mm.ss?

Raku, 14 12 11 bytes 0+|*/.98334 Try it online! Since we know the bounds of the input, we can substitute a constant operation and a floor on the input in base 60. ...
Jo King's user avatar
  • 47.2k
15 votes

Calculate 500 digits of e

Python 3.8, 58 bytes x=10**499 print(x+sum((x:=x//i)for i in range(1,253))+128) Try it online! Original version, before it was clearly specified that the decimal ...
m90's user avatar
  • 10.5k
14 votes
Accepted

Find a number which generates all the integers mod q

Pyth, 16 15 bytes f-1m.^T/tQdQPtQ Test suite If p is the input, we know that g^(p-1) = 1 mod p, so we just need to check that g^a != 1 mod p for any smaller a. ...
isaacg's user avatar
  • 42k
14 votes

Output first \$n\$ digits of \$\pi^{1/\pi}\$

Python, 149 bytes Saved one byte due to @H.PWiz. ...
primo's user avatar
  • 33.3k
14 votes

Calculate 500 digits of e

Vyxal, 11 bytes 1∆ȯ1∆ṡ+500Ḟ Try it Online! Calculates cosh(1)+sinh(1) to 500 decimal places. ...
emanresu A's user avatar
  • 38.8k
13 votes

Fibonacci-orial

Haskell 41 29 Bytes 1+11 bytes saved by @Laikoni's remarks. f=1:scanl(+)1f (scanl(*)1f!!) 1,...
Christian Sievers's user avatar
13 votes
Accepted

Extreme Fibonacci

Mathematica, 15 34 bytes Fibonacci itself takes ~6s on my computer. And 95(+/-5)s for frontend to display it. ...
Keyu Gan's user avatar
  • 2,163
13 votes

Finding Snakes in a Matrix

Python 2, 275 271 264 249 bytes Saved four bytes by replacing -1 with H and removing one slicing operation (...
Jonathan Frech's user avatar
12 votes
Accepted

Find the prime factors

SageMath, 31 Bytes N=input() print N,"=",factor(N) Test case: ...
12431234123412341234123's user avatar
12 votes

Extreme Fibonacci

Python 2, 70 bytes a,b=0,1 i=1e9 while i: a,b=b,a+b;i-=1 if a>>3360:a/=10;b/=10 print a This ran in 18 minutes and 31 seconds on my laptop, producing the ...
Anders Kaseorg's user avatar
12 votes

Encode - Shuffle - Decode

Jelly, (17 bytes + 18 bytes) × length 6 = 210 points b36µỤỤ+×3µŒ¿b3U+Ṣ Ṣ:3_J Ṣ%3Uḅ3œ?Çḅ36 Try it online! (or with extra debug info) Having had a go at solving this challenge aiming at the stated ...
12 votes

Fastest draw in the west!

...
Riolku's user avatar
  • 451

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