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
42 votes

Addition in base -1+i

Python 2, 98 97 91 84 bytes s=input();L=1 for _ in`s`*8:s+=1098*int(str(s).translate('0011'*64));L*=10 print s%L This does I/O in decimal. The integers have to ...
Dennis's user avatar
  • 210k
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
  • 41.5k
35 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
32 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,797
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
23 votes

Compute the multinomial coefficient

Jelly, 7 6 bytes ;_/!:/ Look ma, no Unicode! This program takes a single list as input, with n at its first index. Try it online! or verify all test cases at ...
Dennis's user avatar
  • 210k
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
21 votes

Fibonacci-orial

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

Fibonacci-orial

Brainfuck, 1198 1067 817 770 741 657 611 603 ...
primo's user avatar
  • 33.3k
21 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
20 votes

Counting creatures on a hexagonal tiling

JavaScript (Node.js),  578 ... 433  431 bytes ...
Arnauld's user avatar
  • 191k
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
17 votes

Find the Factorial!

MATL, 2 bytes :p Explained: ...
flawr's user avatar
  • 43.8k
16 votes

Addition in base -1+i

Pyth, 34 bytes _shM.u,%J/eMeN\12-+PMeNm.B6/J2k,kQ Try it online: Demonstration or Test Suite (takes quite a while). It should satisfy the time restriction though ...
Jakube's user avatar
  • 21.9k
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
  • 41.9k
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
  • 191k
15 votes

How should I tile my kitchen?

APL (Dyalog Unicode), 193 bytes ...
Bubbler's user avatar
  • 75.2k
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.1k
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.2k
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
  • 41.9k
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
  • 37.3k
13 votes

Addition in base -1+i

Jelly, 29 28 26 24 21 20 bytes DBḅ1100ḌµDL+8µ¡Dṣ2ṪḌ This does I/O in decimal. The integers have to be separated by the non-alphanumeric character ...
Dennis's user avatar
  • 210k
13 votes

Addition in base -1+i

Python 2, 69 67 bytes f=lambda a,b:a*a+b*b^58and 2*f(a*b%2*6,f(a/2,b/2))|a+b&1if a else b I/O is done with base 2 integers. -2 thanks @Dennis.
feersum's user avatar
  • 31.3k
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

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