jaredkrinke/100-languages

Solving the first 100 Project Euler problems using 100 different programming languages!

TypeScript

240

144 commits

updated May 19, 2025

See the code

README

100 Programming Languages

This repository tracked a misguided quest to write code in 100 different programming languages, specifically by solving the first 100 Project Euler problems, using a different--and, ideally, new to me--language for each problem. For the record: no AIs were used (or harmed) in the making of this repository.

Note: my understanding is that educational sharing of methods and solutions for (only!) the first 100 Project Euler problems is currently allowed. Spoiler alert!

Suggest Improvements

Most of these languages were new to me, so my solutions aren't always the best examples (esp. the Julia one). If you're experienced with one of these languages and are willing to share a more idiomatic solution, open a pull request! I'll leave the PR open (so it's clear it's not my code) and link it in the table below.

The List

(PR) indicates someone has shared a more idiomatic solution in a pull request.

#ProblemLanguageSolution
1Multiples of 3 or 5SIC-1 Assembly Languagep1.sic1
2Even Fibonacci NumbersSectorLISPp2.lisp
3Largest Prime FactorFortranp3.f90
4Largest Palindrome ProductJp4.ijs
5Smallest MultipleGforthp5.fth
6Sum Square DifferenceStandard ML (SOSML)p6.sml
710001st PrimeSqueak (2.2)p7.st
8Largest Product in a SeriesSQL (SQLite)p8.sql
9Special Pythagorean TripletXSLTp9.xsl
10Summation of PrimesCOBOL-85p10.cbl
11Largest Product in a GridPerlp11.pl
12Highly Divisible Triangular NumberWebGPU Shading Languagep12.wgsl (HTML host)
13Large SumAWKp13.awk
14Longest Collatz SequenceWebAssembly (Text Format)p14.wat
15Lattice PathsScratchp15.sb3
16Power Digit SumCommodore BASIC (2.0)p16.bas
17Number Letter CountsVerilogp17.v
18Maximum Path Sum IXODp18.xodball (screenshot)
19Counting SundaysEXA (TEC Redshift)p19.exa (disc)
20Factorial Digit SumBBC BASICp20.bas
21Amicable NumbersUnisonp21.u
22Names ScoresTCLp22.tcl
23Non-Abundant SumsLilp23.lil
24Lexicographic PermutationsPostScriptp24.ps
251000-digit Fibonacci Numberfep25.fe
26Reciprocal Cyclesx86 assembly (BIOS)p26.asm (boot sector)
27Quadratic PrimesRetroForthp27.forth
28Number Spiral DiagonalsUxntalp28.tal
29Distinct PowersAPLp29.apl (PR)
30Digit Fifth PowersFactorp30.factor
31Coin SumsRebolp31.r
32Pandigital ProductsBashp32.sh
33Digit Cancelling FractionsJuliap33.jl
34Digit FactorialsPietp34.png (ppm, scaled)
35Circular PrimesTurbo Pascal (7.0)p35.pas
36Double-base PalindromesHarep36.ha
37Truncatable PrimesWrenp37.wren
38Pandigital MultiplesPklp38.pkl
39Integer Right Trianglesقلبp39.qlb
40Champernowne's ConstantRocp40.roc
41Pandigital Primewaxp41.wax
42Coded Triangle NumbersBoronp42.b
43Sub-string DivisibilitySelfp43.self
44Pentagon NumbersHaskellp44.hs
45Triangular, Pentagonal, and Hexagonal文言p45.wy
46Goldbach's Other ConjectureIdrisp46.idr
47Distinct Primes FactorsNimp47.nim
48Self PowersMinp48.min
49Prime PermutationsCakelispp49.cake
50Consecutive Prime SumF#p50.fs
51Prime Digit ReplacementsHaxep51.hx
52Permuted MultiplesAmiga Basicp52.bas
53Combinatoric SelectionsK (oK)p53.k (PR)
54Poker HandsTypeScript (type system only)p54.ts
55Lychrel NumbersBlazin' Forthp55.forth (.d64 image)
56Powerful Digit SumG-Pascalp56.pas
57Square Root ConvergentsSchemep57.scm
58Spiral PrimesBCPLp58.b
59XOR DecryptionMATLAB (GNU Octave)p59.m
60Prime Pair SetsMoonScriptp60.moon
61Cyclical Figurate NumbersFennelp61.fnl
62Cubic PermutationsErdep62.erde
63Powerful Digit CountsHyp63.hy (PR)
64Odd Period Square RootsPureScriptp64.purs
65Convergents of eRubyp65.rb
66Diophantine EquationReasonp66.re
67Maximum Path Sum IIT3X/0p67.t
68Magic 5-gon RingAssemblyScriptp68.ts
69Totient MaximumMiniLangp69.ml
70Totient PermutationC (C99)p70.c
71Ordered FractionsClojurep71.clj
72Counting FractionsZigp72.zig
73Counting Fractions in a RangeRakup73.raku
74Digit Factorial ChainsValap74.vala
75Singular Integer Right TrianglesOdinp75.odin
76Counting SummationsQBasicp76.bas
77Prime SummationsHazelp77.hazel
78Coin PartitionsAdap78.adb
79Passcode DerivationShenp79.shen
80Square Root Digital ExpansionPythonp80.py
81Path Sum: Two WaysPre-Schemep81.scm
82Path Sum: Three WaysLOp82.lo
83Path Sum: Four WaysKittenp83.ktn
84Monopoly OddsCommon Lispp84.lisp
85Counting RectanglesBendp85.bend
86Cuboid RouteVp86.v
87Prime Power TriplesLobsterp87.lobster
88Product-sum NumbersDylanp88.dylan
89Roman NumeralsJanetp89.janet
90Cube Digit PairsQuackeryp90.qky
91Right Triangles with Integer CoordinatesATSp91.dats
92Square Digit ChainsMouse-83p92.mou
93Arithmetic ExpressionsCyberp93.cy
94Almost Equilateral TrianglesFutharkp94.fut
95Amicable ChainsVaryxp95.vx
96Su DokuProlog (SWI-Prolog)p96.pro
97Large Non-Mersenne Prime8080 assembly (Altair 8800)p97.asm
98Anagramic SquaresRyep98.rye (PR)
99Largest ExponentialRexxp99.rex
100Arranged ProbabilityNeluap100.nelua
esolangs
polyglot
programming-languages
project-euler

Contributors

jaredkrinke

144 commits

jaredkrinke/100-languages

Solving the first 100 Project Euler problems using 100 different programming languages!

TypeScript

240

144 commits

updated May 19, 2025

See the code

README

100 Programming Languages

This repository tracked a misguided quest to write code in 100 different programming languages, specifically by solving the first 100 Project Euler problems, using a different--and, ideally, new to me--language for each problem. For the record: no AIs were used (or harmed) in the making of this repository.

Note: my understanding is that educational sharing of methods and solutions for (only!) the first 100 Project Euler problems is currently allowed. Spoiler alert!

Suggest Improvements

Most of these languages were new to me, so my solutions aren't always the best examples (esp. the Julia one). If you're experienced with one of these languages and are willing to share a more idiomatic solution, open a pull request! I'll leave the PR open (so it's clear it's not my code) and link it in the table below.

The List

(PR) indicates someone has shared a more idiomatic solution in a pull request.

#ProblemLanguageSolution
1Multiples of 3 or 5SIC-1 Assembly Languagep1.sic1
2Even Fibonacci NumbersSectorLISPp2.lisp
3Largest Prime FactorFortranp3.f90
4Largest Palindrome ProductJp4.ijs
5Smallest MultipleGforthp5.fth
6Sum Square DifferenceStandard ML (SOSML)p6.sml
710001st PrimeSqueak (2.2)p7.st
8Largest Product in a SeriesSQL (SQLite)p8.sql
9Special Pythagorean TripletXSLTp9.xsl
10Summation of PrimesCOBOL-85p10.cbl
11Largest Product in a GridPerlp11.pl
12Highly Divisible Triangular NumberWebGPU Shading Languagep12.wgsl (HTML host)
13Large SumAWKp13.awk
14Longest Collatz SequenceWebAssembly (Text Format)p14.wat
15Lattice PathsScratchp15.sb3
16Power Digit SumCommodore BASIC (2.0)p16.bas
17Number Letter CountsVerilogp17.v
18Maximum Path Sum IXODp18.xodball (screenshot)
19Counting SundaysEXA (TEC Redshift)p19.exa (disc)
20Factorial Digit SumBBC BASICp20.bas
21Amicable NumbersUnisonp21.u
22Names ScoresTCLp22.tcl
23Non-Abundant SumsLilp23.lil
24Lexicographic PermutationsPostScriptp24.ps
251000-digit Fibonacci Numberfep25.fe
26Reciprocal Cyclesx86 assembly (BIOS)p26.asm (boot sector)
27Quadratic PrimesRetroForthp27.forth
28Number Spiral DiagonalsUxntalp28.tal
29Distinct PowersAPLp29.apl (PR)
30Digit Fifth PowersFactorp30.factor
31Coin SumsRebolp31.r
32Pandigital ProductsBashp32.sh
33Digit Cancelling FractionsJuliap33.jl
34Digit FactorialsPietp34.png (ppm, scaled)
35Circular PrimesTurbo Pascal (7.0)p35.pas
36Double-base PalindromesHarep36.ha
37Truncatable PrimesWrenp37.wren
38Pandigital MultiplesPklp38.pkl
39Integer Right Trianglesقلبp39.qlb
40Champernowne's ConstantRocp40.roc
41Pandigital Primewaxp41.wax
42Coded Triangle NumbersBoronp42.b
43Sub-string DivisibilitySelfp43.self
44Pentagon NumbersHaskellp44.hs
45Triangular, Pentagonal, and Hexagonal文言p45.wy
46Goldbach's Other ConjectureIdrisp46.idr
47Distinct Primes FactorsNimp47.nim
48Self PowersMinp48.min
49Prime PermutationsCakelispp49.cake
50Consecutive Prime SumF#p50.fs
51Prime Digit ReplacementsHaxep51.hx
52Permuted MultiplesAmiga Basicp52.bas
53Combinatoric SelectionsK (oK)p53.k (PR)
54Poker HandsTypeScript (type system only)p54.ts
55Lychrel NumbersBlazin' Forthp55.forth (.d64 image)
56Powerful Digit SumG-Pascalp56.pas
57Square Root ConvergentsSchemep57.scm
58Spiral PrimesBCPLp58.b
59XOR DecryptionMATLAB (GNU Octave)p59.m
60Prime Pair SetsMoonScriptp60.moon
61Cyclical Figurate NumbersFennelp61.fnl
62Cubic PermutationsErdep62.erde
63Powerful Digit CountsHyp63.hy (PR)
64Odd Period Square RootsPureScriptp64.purs
65Convergents of eRubyp65.rb
66Diophantine EquationReasonp66.re
67Maximum Path Sum IIT3X/0p67.t
68Magic 5-gon RingAssemblyScriptp68.ts
69Totient MaximumMiniLangp69.ml
70Totient PermutationC (C99)p70.c
71Ordered FractionsClojurep71.clj
72Counting FractionsZigp72.zig
73Counting Fractions in a RangeRakup73.raku
74Digit Factorial ChainsValap74.vala
75Singular Integer Right TrianglesOdinp75.odin
76Counting SummationsQBasicp76.bas
77Prime SummationsHazelp77.hazel
78Coin PartitionsAdap78.adb
79Passcode DerivationShenp79.shen
80Square Root Digital ExpansionPythonp80.py
81Path Sum: Two WaysPre-Schemep81.scm
82Path Sum: Three WaysLOp82.lo
83Path Sum: Four WaysKittenp83.ktn
84Monopoly OddsCommon Lispp84.lisp
85Counting RectanglesBendp85.bend
86Cuboid RouteVp86.v
87Prime Power TriplesLobsterp87.lobster
88Product-sum NumbersDylanp88.dylan
89Roman NumeralsJanetp89.janet
90Cube Digit PairsQuackeryp90.qky
91Right Triangles with Integer CoordinatesATSp91.dats
92Square Digit ChainsMouse-83p92.mou
93Arithmetic ExpressionsCyberp93.cy
94Almost Equilateral TrianglesFutharkp94.fut
95Amicable ChainsVaryxp95.vx
96Su DokuProlog (SWI-Prolog)p96.pro
97Large Non-Mersenne Prime8080 assembly (Altair 8800)p97.asm
98Anagramic SquaresRyep98.rye (PR)
99Largest ExponentialRexxp99.rex
100Arranged ProbabilityNeluap100.nelua
esolangs
polyglot
programming-languages
project-euler

Contributors

jaredkrinke

144 commits

Languages

TypeScript

29.8%

Common Lisp

5.7%

Self

3.8%

Forth

3.7%

MATLAB

2.9%

Assembly

2.7%

Pascal

2.5%

Verilog

2.3%

Scheme

2.1%

Cycript

1.9%

Haxe

1.9%

PostScript

1.8%

Perl

1.6%

C

1.5%

HTML

1.5%

Janet

1.4%

Reason

1.4%

QuickBASIC

1.4%

C#

1.4%

Fennel

1.4%

Wren

1.4%

Prolog

1.3%

Python

1.2%

MoonScript

1.1%

Shen

1.1%

WebAssembly

1.0%

Vala

1.0%