Awesome
Euler's Melting Pot
This is a Project Euler attempt. The catch is that every challenge will be completed in a different programming language.
Euler's Melting Pot is also being run as an educational YouTube series, where I talk about the code I've written here. See https://www.youtube.com/playlist?list=PL1ltQrTP1szcCAD-Jm-6eQdV_zhnm3oNq
Languages Used
Full details of the various solutions are listed below, but for the sake of easy reference, here is an alphabetized list of the languages that have been used in these challenges so far.
- *><>
- ///
- 05AB1E
- 1.1
- 11l
- 42
- ><>
- ><>\\.:.
- Actually
- Ada
- Agda
- AGSPL
- ALGOL 68
- Alice
- Anti-Array
- APL
- Arc
- ArkScript
- AssemblyScript
- AutoHotkey
- AWK
- Aya
- Batch
- bc
- BeanShell
- Beeswax
- Befalse
- Befreak
- Befunge
- Befunk
- Brainf**k
- Brat
- Broccoli
- Burlesque
- Bussin
- C#
- Chef
- CIL
- CJam
- COBOL
- Coconut
- Comefrom0x10
- COMPLEX
- π
- Csh
- Cubix
- Cyclone
- D
- Dafny
- Dhall
- Dictu
- Dip
- Dogescript
- Dry
- Dylan
- Earl Grey
- ed
- Eiffel
- ELisp
- Elixir
- Emoji
- Emoticon
- Emotinomicon
- Enchilada
- Erlang
- πΌππππ
- Factor
- Factorio
- FALSE
- Fennel
- FiM++
- Fish
- Folders
- Forth
- Fortran
- Fourier
- Funciton
- Game Builder Garage
- Genie
- Gibberish
- Glava
- Gleam
- GML
- GNU Octave
- Go
- Golfscript
- Grocery List
- Gwion
- Hanabi
- Hexagony
- Hy
- Hyperscript
- i
- Icon
- IntercalScript
- Io
- Ioke
- J
- Japt
- Jasmin
- Javagony
- Javagrid
- Jelly
- Joy
- JSF**k
- Julia
- JustBASIC
- K
- Kitten
- Labyrinth
- LaTeX
- Lean
- LilyPond
- LLVM IR
- m4
- Make
- MagiStack
- MASM
- Math++
- MATL
- Microsoft Excel
- Minecraft
- Minus
- MontiLang
- MoonScript
- Mouse-2002
- NASM
- naz
- Nemerle
- Nial
- Nim
- Nit
- Oasis
- Oberon-07
- Objective-C
- OCaml
- Odin
- Oxide
- Pascal
- Parrot IR
- PASM
- Perchance
- Picat
- Pickle
- Piet
- Pike
- Pikt
- Pip
- Pizza
- Pony
- Potassco
- Prolog
- Pyf**ck
- Pyth
- Pyramid Scheme
- QBASIC
- Rebol
- Rockstar
- Roy
- Rust
- Scratch
- sed
- Seriously
- Shakespeare
- Skib-Lang
- Smalltalk
- SNOBOL
- Snowman
- Standard ML
- Stuck
- SuperCollider
- Swift
- Taxi
- Tcl
- Tome
- Tovie
- TRANSCRIPT
- TypeScript
- V
- Vala
- Vale
- VBA
- Verilog
- Visual Basic .NET
- WebAssembly
- Wenyan
- Whirl
- Whitespace
- Wren
- Wyvern
- X10
- XSLT
- Z
- Zig
- zkl
- Zsh
Completed Challenges
Euler 1
- File: problem1.golf
- Language: Golfscript
- Compiler / Interpreter: copy.sh
- Notes: (None)
Euler 2
- File: problem2.bf
- Language: Brainf**k
- Compiler / Interpreter: copy.sh
- Notes: This code was written with the help of a Lisp translator program.
Euler 3
- File: problem3.ijs
- Language: J
- Compiler / Interpreter: The de facto standard
- Notes: (None)
Euler 4
- File: problem4.bat
- Language: Batch
- Compiler / Interpreter: Windows CMD
- Notes: This one is really slow. Interestingly, it seems to be not the palindrome check but the multiplication that slows it down.
Euler 5
- File: problem5.jelly
- Language: Jelly
- Compiler / Interpreter: TIO Nexus
- Notes: (None)
Euler 6
- File: problem6.hxg
- Language: Hexagony
- Compiler / Interpreter: The reference implementation
- Notes: (None)
Euler 7
- File: problem7.ws
- Language: Whitespace
- Compiler / Interpreter: TIO Nexus
- Notes: This code was written with the help of a Lisp translator program.
Euler 8
- File: problem8.io
- Language: Io
- Compiler / Interpreter: The official implementation
- Notes: (None)
Euler 9
- File: problem9.spl
- Language: Shakespeare
- Compiler / Interpreter: Lingua::Shakespeare
- Notes: (None)
Euler 10
- File: problem10.cjam
- Language: CJam
- Compiler / Interpreter: TIO Nexus
- Notes: (None)
Euler 11
- File: problem11.s
- Language: NASM
- Compiler / Interpreter: NASM + GCC Linker
- Notes: 64-bit architectures, only. Uses Windows calling convention; to run on Linux, call puts with RDI rather than RCX.
Euler 12
- File: problem12.ab
- Language: 05AB1E
- Compiler / Interpreter: TIO Nexus
- Notes: (None)
Euler 13
- File: problem13.sed
- Language: sed
- Compiler / Interpreter: GNU sed
- Notes: Other sed implementations may not work. Must supply
./files/problem13.txt
as input.
Euler 14
- File: problem14.st
- Language: Smalltalk
- Compiler / Interpreter: tutorialspoint.com
- Notes: The interpreter seems to run faster in Google Chrome.
Euler 15
- File: problem15.pl
- Language: Prolog
- Compiler / Interpreter: SWI Prolog
- Notes: Uses some SWI-specific database features; may not work in other Prolog implementations.
Euler 16
- File: problem16.lab
- Language: Labyrinth
- Compiler / Interpreter: TIO Nexus
- Notes: (None)
Euler 17
- File: problem17.slsh
- Language: ///
- Compiler / Interpreter: The included Perl script
- Notes: A surprisingly efficient solution, given the choice of language.
Euler 18
- File: problem18.mk
- Language: Make
- Compiler / Interpreter: GNU Make
- Notes: Other Make implementations may not work.
Euler 19
- File: problem19.bas
- Language: QBASIC
- Compiler / Interpreter: repl.it
- Notes: (None)
Euler 20
- File: problem20.pyth
- Language: Pyth
- Compiler / Interpreter: TIO Nexus
- Notes: (None)
Euler 21
- File: problem21.apl
- Language: APL
- Compiler / Interpreter: tryapl.org
- Notes: (None)
Euler 22
- File: problem22.exs
- Language: Elixir
- Compiler / Interpreter: The standard compiler
- Notes: Depends on
./files/p022_names.txt
.
Euler 23
- File: problem23.go
- Language: Go
- Compiler / Interpreter: The standard compiler
- Notes: (None)
Euler 24
- File: problem24.sh
- Language: Csh
- Compiler / Interpreter: Tcsh
- Notes: Uses a rather unusual algorithm to manually generate each digit.
Euler 25
- File: problem25.png
- Language: Piet
- Compiler / Interpreter: rpiet
- Notes: Piet interpreter must have bignum integers, not fixed size.
Euler 26
- File: problem26.sh
- Language: Zsh
- Compiler / Interpreter: Zsh
- Notes: (None)
Euler 27
- File: problem27.ik
- Language: Ioke
- Compiler / Interpreter: Ioke for the JVM
- Notes: A somewhat slow solution.
Euler 28
- File: problem28.bf
- Language: Befunge
- Compiler / Interpreter: quirkster.com
- Notes: The immediate shift on the first row is necessary; the first row is used for storage in this program.
Euler 29
- File: problem29.srs
- Language: Seriously
- Compiler / Interpreter: TIO Nexus
- Notes: The seemingly pointless union with the empty list at the end serves to remove duplicates.
Euler 30
- File: problem30.stk
- Language: Stuck
- Compiler / Interpreter: The official interpreter
- Notes: The interpreter seems to require some minor modification to work with Unicode on some systems, a somewhat slow solution.
Euler 31
- File: problem31.sml
- Language: Standard ML
- Compiler / Interpreter: TIO Nexus
- Notes: (None)
Euler 32
- File: problem32.cbl
- Language: COBOL
- Compiler / Interpreter: tutorialspoint.com
- Notes: (None)
Euler 33
- File: problem33.xsl
- Language: XSLT
- Compiler / Interpreter: Mozilla Firefox
- Notes: Load
./files/p33.xml
to run the XSLT code; requires disablingsecurity.fileuri.strict_origin_policy
on Firefox due to local system security constraints.
Euler 34
- File: problem34.f95
- Language: Fortran
- Compiler / Interpreter: tutorialspoint.com
- Notes: (None)
Euler 35
- File: problem35.ml
- Language OCaml
- Compiler / Interpreter: OCaml on Windows
- Notes: (None)
Euler 36
- File: problem36.fth
- Language: Forth
- Compiler / Interpreter: repl.it
- Notes: (None)
Euler 37
- File: problem37.jsf
- Language: JSF**k
- Compiler / Interpreter: The provided runner
- Notes: Code was generated with the help of the official website's translator.
Euler 38
- File: problem38.bas
- Language: JustBASIC
- Compiler / Interpreter: The provided IDE
- Notes: (None)
Euler 39
- File: problem39.adb
- Language: Ada
- Compiler / Interpreter: tutorialspoint.com
- Notes: (None)
Euler 40
- File: problem40.tex
- Language: LaTeX
- Compiler / Interpreter: MiKTeX
- Notes: May have to increase the memory limit, depending on OS.
Euler 41
- File: problem41.asm
- Language: MASM
- Compiler / Interpreter: MASM32
- Notes: A somewhat slow solution.
Euler 42
- File: problem42.j
- Language: Jasmin
- Compiler / Interpreter: The standard assembler
- Notes: Depends on
./files/p042_words.txt
.
Euler 43
- File: problem43.tcl
- Language: Tcl
- Compiler / Interpreter: The standard interpreter
- Notes: (None)
Euler 44
- File: problem44.xlsm
- Language: VBA
- Compiler / Interpreter: Microsoft Excel 2013
- Notes: Run the macro
Sheet1.Euler44
; code is available at etc/problem44.bas.
Euler 45
- File: problem45.fish
- Language: ><>
- Compiler / Interpreter: fish.py
- Notes: (None)
Euler 46
- File: problem46.matl
- Language: MATL
- Compiler / Interpreter: The official interpreter
- Notes: (None)
Euler 47
- File: problem47.sno
- Language: SNOBOL
- Compiler / Interpreter: CSNOBOL4
- Notes: A very slow solution.
Euler 48
- File: problem48.sb2
- Language: Scratch
- Compiler / Interpreter: The project editor
- Notes: Screenshot is available at etc/Scratch/problem48.png.
Euler 49
- File: problem49.il
- Language: CIL
- Compiler / Interpreter: Mono
- Notes: (None)
Euler 50
- File: problem50.alg
- Language: ALGOL 68
- Compiler / Interpreter: tutorialspoint.com
- Notes: (None)
Euler 51
- File: problem51.d
- Language: D
- Compiler / Interpreter: DMD
- Notes: (None)
Euler 52
- File: problem52.wren
- Language: Wren
- Compiler / Interpreter: The reference implementation
- Notes: (None)
Euler 53
- File: problem53.sfish
- Language: *><>
- Compiler / Interpreter: The official interpreter
- Notes: (None)
Euler 54
- File: problem54.rs
- Language: Rust
- Compiler / Interpreter: The standard compiler
- Notes: (None)
Euler 55
- File: problem55.pas
- Language: Pascal
- Compiler / Interpreter: tutorialspoint.com
- Notes: (None)
Euler 56
- File: problem56.bc
- Language: bc
- Compiler / Interpreter: GNU bc
- Notes: (None)
Euler 57
- File: problem57.factor
- Language: Factor
- Compiler / Interpreter: The official interpreter
- Notes: (None)
Euler 58
- File: problem58.el
- Language: ELisp
- Compiler / Interpreter: GNU Emacs
- Notes: A somewhat slow solution.
Euler 59
- File: problem59.pike
- Language: Pike
- Compiler / Interpreter: The official interpreter
- Notes: (None)
Euler 60
- File: problem60.gml
- Language: Game Maker Language
- Compiler / Interpreter: GMLive
- Notes: The interpreter seems to run faster in Google Chrome.
Euler 61
- File: problem61.ily
- Language: LilyPond
- Compiler / Interpreter: The official interpreter
- Notes: Outputs result to PDF.
Euler 62
- File: problem62.roy
- Language: Roy
- Compiler / Interpreter: The provided compiler
- Notes: May have to increase maximum stack size to run.
Euler 63
- File: problem63.ench
- Language: Enchilada
- Compiler / Interpreter: The official interpreter
- Notes: This code was compiled with the help of a Perl translator program.
Euler 64
- File: problem64.m4
- Language: m4
- Compiler / Interpreter: GNU m4
- Notes: Other m4 implementations may not work.
Euler 65
- File: problem65.fnc
- Language: Funciton
- Compiler / Interpreter: The official interpreter
- Notes: A somewhat slow solution.
Euler 66
- File: problem66.bean
- Language: BeanShell
- Compiler / Interpreter: TIO Nexus
- Notes: (None)
Euler 67
- File: problem67.gl
- Language: Grocery List
- Compiler / Interpreter: Archived interpreter
- Notes: Code was written with the help of a Lisp translator program. Pipe
./files/p067_triangle.txt
as standard input. File must have Unix line endings.
Euler 68
- File: problem68.ll
- Language: LLVM IR
- Compiler / Interpreter: The official compiler
- Notes: (None)
Euler 69
- File: problem69.m
- Language: Objective-C
- Compiler / Interpreter: GCC
- Notes: (None)
Euler 70
- File: problem70.Mod
- Language: Oberon-07
- Compiler / Interpreter: OBNC
- Notes: A somewhat slow solution.
Euler 71
- File: problem71.taxi
- Language: Taxi
- Compiler / Interpreter: The provided interpreter
- Notes: A very slow solution.
Euler 72
- File: problem72.nim
- Language: Nim
- Compiler / Interpreter: The official compiler
- Notes: (None)
Euler 73
- File: problem73.cool
- Language: π
- Compiler / Interpreter: The official interpreter
- Notes: A very slow solution. Screenshot is available at etc/problem73_screenshot.png.
Euler 74
- File: problem74.pasm
- Language: PASM
- Compiler / Interpreter: The Parrot VM
- Notes: (None)
Euler 75
- File: problem75.mou
- Language: Mouse-2002
- Compiler / Interpreter: The provided interpreter
- Notes: Interpreter requires a bit of tweaking to work with modern compilers. Will need to increase the
ARRAYSIZE
to run.
Euler 76
- File: problem76.befalse
- Language: Befalse
- Compiler / Interpreter: quirkster.com
- Notes: Scroll down; the first 202 lines are used for storage.
Euler 77
- File: problem77.false
- Language: FALSE
- Compiler / Interpreter: quirkster.com
- Notes: Lightly commented code is available at etc/problem77_commented.false.
Euler 78
- File: problem78.vala
- Language: Vala
- Compiler / Interpreter: valac
- Notes: (None)
Euler 79
- File: problem79.ed
- Language: ed
- Compiler / Interpreter: GNU ed 1.18
- Notes: Supply
./files/0079_keylog.txt
as argument andproblem79.ed
as piped standard input.
Euler 80
- File: problem80.wyv
- Language: Wyvern
- Compiler / Interpreter: The provided interpreter
- Notes: (None)
Euler 81
- File: problem81.v
- Language: V
- Compiler / Interpreter: The provided interpreter
- Notes: Supply
./files/p081_matrix.txt
as input; the source file contains control characters that may or may not render correctly in various text editors. Screenshot is available at etc/problem81_screenshot.png.
Euler 82
- File: problem82.awk
- Language: AWK
- Compiler / Interpreter: mawk
- Notes: Pass
./files/p082_matrix.txt
as input.
Euler 83
- File: problem83.djs
- Language: Dogescript
- Compiler / Interpreter: The provided compiler
- Notes: (None)
Euler 84
- File: problem84.e
- Language: Eiffel
- Compiler / Interpreter: The provided compiler
- Notes:
./etc/build84.sh
may be helpful in compiling the source.
Euler 85
- File: problem85.cub
- Language: Cubix
- Compiler / Interpreter: The provided interpreter
- Notes: A somewhat slow solution.
Euler 86
- File: problem86.aya
- Language: Aya
- Compiler / Interpreter: The provided interpreter
- Notes: (None)
Euler 87
- File: problem87.brat
- Language: Brat
- Compiler / Interpreter: The provided interpreter
- Notes: (None)
Euler 88
- File: problem88.esmin
- Language: πΌππππ
- Compiler / Interpreter: The provided interpreter
- Notes: (None)
Euler 89
- File: problem89.11
- Language: 1.1
- Compiler / Interpreter: The provided Perl script
- Notes: Pass
./files/p089_roman.txt
as input.
Euler 90
- File: problem90.1+1j
- Language: COMPLEX
- Compiler / Interpreter: The provided interpreter
- Notes: Code was written with the help of a Lisp translator program.
Euler 91
- File: problem91.aarr
- Language: Anti-Array
- Compiler / Interpreter: The provided interpreter
- Notes: A somewhat slow solution; the interpreter crashes at the end for unknown reasons, but the answer printed is still correct.
Euler 92
- File: problem92.sc
- Language: SuperCollider
- Compiler / Interpreter: The official interpreter
- Notes: A somewhat slow solution.
Euler 93
- File: problem93.gs
- Language: Genie
- Compiler / Interpreter: valac
- Notes: Ignore the lengthy list of pointer cast warnings when compiling.
Euler 94
- File: problem94.fact
- Language: Factorio
- Compiler / Interpreter: Factorio
- Notes: Import the blueprint, then set the lower-left constant combinator to R=0 to run. Thanks to DaveMcW for his compact digit display design. Screenshot is available at etc/problem94_screenshot.png.
Euler 95
- File: problem95.pir
- Language: Parrot IR
- Compiler / Interpreter: The Parrot VM
- Notes: (None)
Euler 96
- File: problem96.java
- Language: Javagony
- Compiler / Interpreter: openjdk
- Notes: An incredibly slow solution.
Euler 97
- File: problem97.mpp
- Language: Math++
- Compiler / Interpreter: The provided interpreter
- Notes: A very slow solution, outputs its answer in scientific notation but with sufficient precision.
Euler 98
- File: problem98.gl
- Language: Glava
- Compiler / Interpreter: The provided interpreter
- Notes: (None)
Euler 99
- File: problem99.hnb
- Language: Hanabi
- Compiler / Interpreter: The provided interpreter
- Notes: Pass
./files/p099_base_exp.txt
as input.
Euler 100
- File: problem100.snow
- Language: Snowman
- Compiler / Interpreter: The provided interpreter
- Notes: Code was written with the help of a Lisp translator program.
Euler 101
- File: problem101.gibb
- Language: Gibberish
- Compiler / Interpreter: The unofficial Python interpreter
- Notes: (None)
Euler 102
- File: problem102.magi
- Language: MagiStack
- Compiler / Interpreter: MagiStack 1.2 Interpreter
- Notes: Code was written with the help of a Lisp translator program; provide
./files/p102_triangles.txt
as input.
Euler 103
- File: problem103.dylan
- Language: Dylan
- Compiler / Interpreter: Open Dylan
- Notes:
./etc/build103.sh
may be helpful in building the source.
Euler 104
- File: problem104.zkl
- Language: zkl
- Compiler / Interpreter: The official interpreter
- Notes: (None)
Euler 105
- File: problem105.fnl
- Language: Fennel
- Compiler / Interpreter: fennel-0.7.0.lua
- Notes: (None)
Euler 106
- File: problem106.joy
- Language: Joy
- Compiler / Interpreter: Archived interpreter
- Notes: The interpreter dumps some noisy debugging information, which can be safely ignored.
Euler 107
- File: problem107.pi
- Language: Picat
- Compiler / Interpreter: The official interpreter
- Notes: (None)
Euler 108
- File: problem108.agda
- Language: Agda
- Compiler / Interpreter: Agda 2.6.0.1
- Notes: Requires agda-stdlib 1.2.
Euler 109
- File: problem109.png
- Language: Befunk
- Compiler / Interpreter: The provided interpreter
- Notes: A very slow solution; code was written with the help of a Python translator program.
Euler 110
- File: problem110.pip
- Language: Pip
- Compiler / Interpreter: The provided interpreter
- Notes: A somewhat slow solution.
Euler 111
- File: problem111.n
- Language: Nemerle
- Compiler / Interpreter: The official compiler
- Notes: (None)
Euler 112
- File: problem112.fimpp
- Language: FiM++
- Compiler / Interpreter: TIO Nexus
- Notes: A somewhat slow solution.
Euler 113
- File: problem113.chef
- Language: Chef
- Compiler / Interpreter: TIO Nexus
- Notes: Code was written with the help of a Perl translator program.
Euler 114
- File: problem114.bees
- Language: Beeswax
- Compiler / Interpreter: TIO Nexus
- Notes: Code was written with the help of a Lisp translator program; a somewhat slow solution.
Euler 115
- File: problem115.mt
- Language: MontiLang
- Compiler / Interpreter: The provided interpreter
- Notes: A somewhat slow solution.
Euler 116
- File: problem116.ktn
- Language: Kitten
- Compiler / Interpreter: The provided interpreter
- Notes: (None)
Euler 117
- File: problem117.pony
- Language: Pony
- Compiler / Interpreter: Pony Playground
- Notes: (None)
Euler 118
- File: problem118.jl
- Language: Julia
- Compiler / Interpreter: Julia 1.2.0
- Notes: (None)
Euler 119
- File: problem119.gleam
- Language: Gleam
- Compiler / Interpreter: The official compiler
- Notes:
./etc/build119.sh
may be helpful in building the source.
Euler 120
- File: problem120.tome
- Language: Tome
- Compiler / Interpreter: The provided interpreter
- Notes: The interpreter seems to run faster in Google Chrome.
Euler 121
- File: problem121.emoji
- Language: Emoji
- Compiler / Interpreter: The provided interpreter
- Notes: Screenshot is available at etc/problem121_screenshot.png.
Euler 122
- File: problem122.vb
- Language: Visual Basic .NET
- Compiler / Interpreter: TIO Nexus
- Notes: (None)
Euler 123
- File: problem123.wen
- Language: Wenyan
- Compiler / Interpreter: The online IDE
- Notes: The answer is outputted in Classical Chinese.
Euler 124
- File: problem124.ics
- Language: IntercalScript
- Compiler / Interpreter: The provided compiler
- Notes: (None)
Euler 125
- File: problem125.icon
- Language: Icon
- Compiler / Interpreter: TIO Nexus
- Notes: A somewhat slow solution.
Euler 126
- File: problem126.i
- Language: i
- Compiler / Interpreter: The provided interpreter
- Notes:
./etc/build126.sh
may be helpful in building the source; a somewhat slow solution.
Euler 127
- File: problem127.nit
- Language: Nit
- Compiler / Interpreter: The provided compiler
- Notes: The Nit interpreter is prohibitively slow in running this problem; use the compiler
nitc
instead.
Euler 128
- File: problem128.alice
- Language: Alice
- Compiler / Interpreter: TIO Nexus
- Notes: A somewhat slow solution.
Euler 129
- File: problem129.befreak
- Language: Befreak
- Compiler / Interpreter: The provided interpreter
- Notes: Code was written with the help of a Scala translator program; a very slow solution.
Euler 130
- File: problem130.four
- Language: Fourier
- Compiler / Interpreter: Archived interpreter
- Notes: Code was written with the help of a Haskell translator program; an incredibly slow solution.
Euler 131
- File: problem131.perchance
- Language: Perchance
- Compiler / Interpreter: The online interpreter
- Notes: (None)
Euler 132
- File: problem132.gw
- Language: Gwion
- Compiler / Interpreter: The provided interpreter
- Notes: (None)
Euler 133
- File: problem133.ahk
- Language: AutoHotkey
- Compiler / Interpreter: AutoHotkey
- Notes: (None)
Euler 134
- File: problem134.dfy
- Language: Dafny
- Compiler / Interpreter: Dafny 3.2.0
- Notes:
./etc/build134.sh
may be helpful in building the source.
Euler 135
- File: problem135.tovie
- Language: Tovie
- Compiler / Interpreter: Tovie v_03
- Notes: A somewhat slow solution; must be run using the Python transpiler (
./tovie -f python ./problem135.tovie
), as the default compiler'smalloc
implementation is broken.
Euler 136
- File: problem136.v
- Language: Verilog
- Compiler / Interpreter: Verilator 4.224
- Notes:
./etc/build136.sh
may be helpful in building the source.
Euler 137
- File: problem137.zip
- Language: Minecraft
- Compiler / Interpreter: Minecraft Java Edition 1.18.2
- Notes: Zip contains a world save file; toggle the start lever to re-run the calculation. Answer is displayed in hexadecimal. A very slow solution. Screenshots are available at etc/Minecraft.
Euler 138
- File: problem138.pickle
- Language: Pickle
- Compiler / Interpreter: Python 3.7.9
- Notes:
./etc/run138.py
may be helpful in running the source; code was written with the help of a Lisp translator program.
Euler 139
- File: problem139.vale
- Language: Vale
- Compiler / Interpreter: Vale 0.2 Kuma
- Notes: (None)
Euler 140
- File: problem140.dip
- Language: Dip
- Compiler / Interpreter: Try Dip
- Notes: (None)
Euler 141
- File: problem141.wat
- Language: WebAssembly
- Compiler / Interpreter: wasmer 2.3.0
- Notes: (None)
Euler 142
- File: problem142.ark
- Language: ArkScript
- Compiler / Interpreter: ArkScript 3.4.0
- Notes: (None)
Euler 143
- File: problem143.ts
- Language: TypeScript
- Compiler / Interpreter: tsc version 4.9.5
- Notes: (None)
Euler 144
- File: problem144.japt
- Language: Japt
- Compiler / Interpreter: Japt 1.4.6 interpreter
- Notes: (None)
Euler 145
- File: problem145.txt
- Language: Game Builder Garage
- Compiler / Interpreter: Game Builder Garage Ver 1.0.1
- Notes: Nintendo Switch required to run; screenshots are available at etc/GameBuilderGarage.
Euler 146
- File: problem146.x10
- Language: X10
- Compiler / Interpreter: X10 Release 2.6.2
- Notes: A somewhat slow solution.
Euler 147
- File: problem147.lean
- Language: Lean Theorem Prover
- Compiler / Interpreter: Lean (version 3.42.1, commit 68455b087d87, Release)
- Notes:
./etc/build147.sh
may be helpful in building the source.
Euler 148
- File: problem148.trn
- Language: TRANSCRIPT
- Compiler / Interpreter: The official interpreter
- Notes: (None)
Euler 149
- File: problem149.z
- Language: Z
- Compiler / Interpreter: @zlanguage/zcomp/0.4.5 linux-x64 node-v14.18.2
- Notes: (None)
Euler 150
- File: problem150.moon
- Language: MoonScript
- Compiler / Interpreter: MoonScript version 0.5.0
- Notes: (None)
Euler 151
- File: problem151.dry
- Language: Dry
- Compiler / Interpreter: The official interpreter (02e9cbf)
- Notes: Provided solution does not round the result off to six digits.
Euler 152
- File: problem152.erl
- Language: Erlang
- Compiler / Interpreter: Erlang/OTP 25
- Notes: (None)
Euler 153
- File: problem153.m
- Language: GNU Octave
- Compiler / Interpreter: GNU Octave, version 7.3.0
- Notes: A very slow solution.
Euler 154
- File: problem154.eg
- Language: Earl Grey
- Compiler / Interpreter: Earl Grey version 0.1.2
- Notes: An incredibly slow solution.
Euler 155
- File: problem155.cs
- Language: C#
- Compiler / Interpreter: Mono JIT compiler version 6.12.0.182
- Notes: (None)
Euler 156
- File: problem156.arc
- Language: Arc
- Compiler / Interpreter: Arcadia 0.25.1
- Notes: (None)
Euler 157
- File: problem157.blsq
- Language: Burlesque
- Compiler / Interpreter: Burlesque 1753bdf
- Notes: A somewhat slow solution; code was written with the help of a Racket translator program.
Euler 158
- File: problem158.cf0x10
- Language: Comefrom0x10
- Compiler / Interpreter: The official interpreter
- Notes: (None)
Euler 159
- File: problem159.png
- Language: Pikt
- Compiler / Interpreter: Pikt 64025d6
- Notes:
./etc/build159.sh
may be helpful in building the source.
Euler 160
- File: problem160.r
- Language: Rebol
- Compiler / Interpreter: REBOL/Core 2.7.8.4.10 (23-Jan-2016)
- Notes: (None)
Euler 161
- File: problem161.swift
- Language: Swift
- Compiler / Interpreter: swift-5.8.1-RELEASE
- Notes: (None)
Euler 162
- File: problem162.xlsx
- Language: Microsoft Excel
- Compiler / Interpreter: Office 365 Excel 16.0.16704.42304
- Notes: Due to numerical precision limits, the answer is printed along two cells
Euler 163
- File: problem163.ts
- Language: AssemblyScript
- Compiler / Interpreter: assemblyscript 0.19.23
- Notes:
./etc/build163.sh
may be helpful in building the source.
Euler 164
- File: problem164.dhall
- Language: Dhall
- Compiler / Interpreter: Dhall 1.41.2
- Notes: (None)
Euler 165
- File: problem165.hy
- Language: Hy
- Compiler / Interpreter: hy 0.27.0+96.g902233d8
- Notes: An incredibly slow solution.
Euler 166
- File: problem166.rock
- Language: Rockstar
- Compiler / Interpreter: wolfgang42/rockstar-js 29a1476
- Notes: Indented version is available at etc/problem166_indented.rock.
Euler 167
- File: problem167.zig
- Language: Zig
- Compiler / Interpreter: 0.12.0-dev.1200+5f92b070b
- Notes: A very slow solution, recommended to be compiled with
-OReleaseFast
.
Euler 168
- File: problem168.11l
- Language: 11l
- Compiler / Interpreter: 11l 2022.11
- Notes: (None)
Euler 169
- File: problem169.gspl
- Language: AGSPL
- Compiler / Interpreter: AGSPL (commit eb6afa05)
- Notes: (None)
Euler 170
- File: problem170.pizza
- Language: Pizza
- Compiler / Interpreter: Pizza v1.0g, 1-October-2001
- Notes: Pizza compiler requires an old Java runtime to run; tested on Java 1.4.2_19
Euler 171
- File: problem171.sh
- Language: Fish
- Compiler / Interpreter: fish, version 3.6.1
- Notes: A very slow solution.
Euler 172
- File: problem172.bsx
- Language: Bussin
- Compiler / Interpreter: bussin c97bece
- Notes: The interpreter hangs after execution.
Euler 173
- File: problem173.folders
- Language: Folders
- Compiler / Interpreter: Folders.py 0bec545
- Notes: Code was written with the help of a Haskell translator program; output of Linux
tree
command is available atetc/problem173_tree.txt
.
Euler 174
- File: problem174.html
- Language: Hyperscript
- Compiler / Interpreter: HyperScript 0.9.12 on Firefox 120.0.1
- Notes: (None)
Euler 175
- File: problem175.emote
- Language: Emotinomicon
- Compiler / Interpreter: The online interpreter
- Notes: A somewhat slow solution; code was written with the help of a Lisp translator program; screenshot is available at etc/problem175_screenshot.png.
Euler 176
- File: problem176.naz
- Language: naz
- Compiler / Interpreter: naz 82960e5
- Notes: Code was written with the help of a Racket translator program; requires the
-u
flag.
Euler 177
- File: problem177.coco
- Language: Coconut
- Compiler / Interpreter: Coconut: Version 3.0.4
- Notes: A somewhat slow solution.
Euler 178
- File: problem178.k
- Language: K
- Compiler / Interpreter: ngn/k on TIO Nexus
- Notes: (None)
Euler 179
- File: problem179.whirl
- Language: Whirl
- Compiler / Interpreter: Whirl-2.java
- Notes: An incredibly slow solution, code was written with the help of a Racket translator program.
Euler 180
- File: problem180.pyf
- Language: Pyf**ck
- Compiler / Interpreter: Python 3.11.6
- Notes: Code was generated with the help of the creator's translation tool.
Euler 181
- File: problem181.oa
- Language: Oasis
- Compiler / Interpreter: oasis @ 9c3bed49
- Notes: (None)
Euler 182
- File: problem182.br
- Language: Broccoli
- Compiler / Interpreter: https://mathieucaroff.com/broccoli
- Notes: (None)
Euler 183
- File: problem183.pyra
- Language: Pyramid Scheme
- Compiler / Interpreter: Pyramid-Scheme @ fd183d29
- Notes: Code was written with the help of a Scala translator program.
Euler 184
- File: problem184.L42
- Language: 42
- Compiler / Interpreter: L42PortableLinux.zip
- Notes:
./etc/build184.sh
may be helpful in building the source.
Euler 185
- File: problem185.lp
- Language: Potassco
- Compiler / Interpreter: clingo
- Notes: The answer outputs
correct(N, X)
, whereX
is theN
th digit in the result.
Euler 186
- File: problem186.odin
- Language: Odin
- Compiler / Interpreter: Odin dev-2024-07
- Notes: Compiler may require a patch on some Linux systems.
Euler 187
- File: problem187.ms
- Language: Minus
- Compiler / Interpreter: iminus.c
- Notes: A very slow solution, will need to increase the
mem_size
constant to compile (#define mem_size 300000000
is sufficient), code was written with the help of a Racket translator program.
Euler 188
- File: problem188.jgrid
- Language: Javagrid
- Compiler / Interpreter: The online interpreter
- Notes: An incredibly slow solution, this Python script can be useful for automating insertion into the web UI.
Euler 189
- File: problem189.ox
- Language: Oxide
- Compiler / Interpreter: oxide-lang at 5088a2d
- Notes: A very slow solution.
Euler 190
- File: problem190.act
- Language: Actually
- Compiler / Interpreter: TIO Nexus
- Notes: (None)
Euler 191
- File: problem191.emot
- Language: Emoticon
- Compiler / Interpreter: teuton.org
- Notes: (None)
Euler 192
- File: problem192.du
- Language: Dictu
- Compiler / Interpreter: dictu-lang @ e43580d2
- Notes: (None)
Euler 193
- File: problem193.ndf
- Language: Nial
- Compiler / Interpreter: Q'Nial V7.0 Aug 29 2019
- Notes: A very slow solution, load the source file with
-defs
then runmain
in the interactive REPL.
Euler 194
- File: problem194.fishchips
- Language: * ><>\\.:.
- Compiler / Interpreter: FishChipsAndMushyPeas @ 52ca7307
- Notes: (None)
Euler 195
- File: problem195.cyc
- Language: Cyclone
- Compiler / Interpreter: TIO Nexus
- Notes: (None)
Euler 196
- File: problem196.skib
- Language: Skib-Lang
- Compiler / Interpreter: alexandermeade/Skib-Lang @ abc4d401
- Notes: (None)
Valid Languages
Mostly, I am just using common sense to determine what constitutes a "language". In particular, a language does not have to be Turing-complete in order for me to consider using it for this challenge. Here are just a few of the guidelines I am following. These are in no way permanent or binding and will change as I progress.
- BF-derivatives and BF-clones are considered identical to Brainf**k and will not be used.
- Lisp derivatives are considered distinct. That is, there will be a Racket, a Common Lisp, and an ELisp, which are all distinct languages.
- Sufficiently different BASIC dialects will be considered distinct. That is, Visual BASIC, Liberty BASIC, and QBASIC are distinct languages, but Liberty BASIC and JustBASIC are one and the same.
- The result should be in a normal, human readable form. For example, in BF it is insufficient to print the ASCII character associated with the integer result; it is required to print the result as a number. There is no specific required format, as some languages may include some garbage around the answer, so long as the answer as outputted is clear and readable. If the language is incapable of outputting a human readable value, whatever is considered acceptable output within the language will be acceptable.
- I have written a few programming languages. At least one of them is in a usable state right now. For fairness, I will not be using any language that I myself wrote.
- Generally speaking, interpreters and compilers are to be taken "as-is". That means that, while it is perfectly permissible to use compiler-specific extensions to a language, it is also necessary to treat any bugs in the chosen compiler as intended behavior. One minor exception to this is in the case of historical code, where minor modifications are necessary to get a language interpreter written long ago to work on a modern computer, as there are several historical languages I aim to use for this challenge.
Speed Adjectives
Some solutions are marked as "slow". Generally speaking, the following rough guidelines can be used to estimate how long it takes to run the code on a reasonably modern computer. These are, of course, very rough estimates, so take them with a grain of salt.
- 30s or less: I will generally not denote these at all.
- 30s to 2min: "A somewhat slow solution"
- 2min to 10min: "A very slow solution"
- More than 10min: "An incredibly slow solution"
Currently, the slowest solutions in this repository are:
- Problem 179 (Whirl) in ~34 minutes
- Problem 130 (Fourier) in ~26 minutes
- Problem 96 (Javagony) in ~20 minutes
- Problem 188 (Javagrid) in ~18 minutes
Currently, the slowest solution in this repository is Problem 130 (Fourier), which takes roughly 26 minutes. The second slowest is Problem 96 (Javagony), at roughly 20 minutes.
I do not have an explicit upper bound on the runtime of a correct algorithm. I will not leave code unattended overnight or for days on end, and the code written must actually terminate on a machine I have access to, not just theoretically produce correct results.
Final Notes
You'll notice that I'm not using many of the mainstream languages so far. This is not because I'm trying to make this challenge harder than it is; this is a purely strategic decision. The later Project Euler problems are more difficult, so I am saving the powerful and easy-to-use languages for them and using obscure, esoteric languages for the easier problems.