Skip to main content
39 votes

Count Like a Babylonian

JavaScript (ES6), 44 bytes Takes input as an array of ASCII characters. a=>a.map(c=>k+=c<1?k*59:c<'?'?10:c<{},k=0)|k Try it online! How? The ...
Arnauld's user avatar
  • 193k
24 votes

Convert a string of digits from words to an integer

PHP, 74 bytes foreach(explode(' ',$argn)as$w)$n.='793251_8640'[crc32($w)%20%11];echo+$n; Try it online! Tried to get a solution which doesn't copy existing ...
Night2's user avatar
  • 5,957
23 votes

Bake me some moji

bash, 14 bytes iconv -fCP1252 Try it online!
Doorknob's user avatar
  • 71.5k
20 votes

Bake me some moji

Java 8, 72 66 36 25 bytes s->new String(s,"cp1252") Try it online. ...
Kevin Cruijssen's user avatar
18 votes

How much Mana do I need?

Python 2, 135 119 115 bytes b=[int('27169735 2 4567 435262'[int(x,36)%141%83%50%23])for x in input()] print b[0]+sum(a*-~b[0]/2for a in b[1:]) Try it online! ...
ovs's user avatar
  • 59.5k
18 votes

Convert an integer to IEEE 754 float

Python, 55 bytes Correct as per original challenge description (always add 2^23 to mantissa) but not per IEEE. ...
loopy walt's user avatar
  • 16.7k
17 votes
Accepted

Golf Text into DNA

Jelly, 15 13 bytes OVBs2UḄị“GCTA Try it online! or verify all test cases. How it works ...
Dennis's user avatar
  • 210k
17 votes

Neutralize data

JavaScript (ES6), 53 47 bytes f=o=>o.big?o.replace(/./g,' '):o.map?o.map(f):0 Test cases ...
Arnauld's user avatar
  • 193k
17 votes

Convert an integer to IEEE 754 float

x86 32-bit machine code, 5 bytes D9 44 24 04 C3 Try it online! Following the cdecl calling convention, this takes the 32-bit ...
m90's user avatar
  • 10.5k
16 votes

Convert superscript numbers to normal numbers

JavaScript, 20 bytes s=>s.normalize`NFKD` Try it online!
Shaggy's user avatar
  • 42.1k
15 votes

Text animation format Code Golf

Python 3, 57 bytes lambda s:eval(s.upper().translate({70:'+[',87:']*'})[1:]) Turns a string like f1w0f2w10 into a expression ...
xnor's user avatar
  • 145k
14 votes

Converting Strings to Decimals (Gone Wrong)

Shakespeare Programming Language, 258 252 bytes -6 bytes thanks to the default. ...
Robin Ryder's user avatar
  • 15.6k
14 votes

Convert superscript numbers to normal numbers

JavaScript (ES6), 43 bytes Edit: +1 to support 0123 -> 123 ... ...
Arnauld's user avatar
  • 193k
14 votes

Convert an integer to IEEE 754 float

Rust, 14 bytes f32::from_bits Not even reached the 30 byte min limit for posts
mousetail's user avatar
  • 12.7k
13 votes

Convert an Excel date code to a "date"

Excel, 3(+7?) =A1 with format yyy/m/d Pure port
12 votes
Accepted

Convert to Bibi-binary

05AB1E, 20 18 16 bytes hv…ÂkdžM¨ÁâyHèJ Explanation ...
Emigna's user avatar
  • 53k
12 votes

Convert to Bibi-binary

Python 2, 58 bytes f=lambda n:(n>15and f(n/16)or"")+"HBKD"[n/4%4]+"OAEI"[n%4] A recursive solution. Try it on Ideone.
xenia's user avatar
  • 8,142
12 votes

Convert to Bubble Letters

Retina, 20 bytes T`Lld`Ⓐ-⓪①-⑨ Try it online! How it works There's a gap between the code points of (0) and (1), but – fortunately – the character ...
Dennis's user avatar
  • 210k
12 votes

12 hour to 24 hour time converter

MATL, 4 bytes 15XO Try it online! Explanation Built-in function: date string conversion with automatic detection of input format and with output format ...
Luis Mendo's user avatar
  • 105k
12 votes

Count Like a Babylonian

C (gcc), 140 138 136 bytes Saved two bytes thanks to ceilingcat. ...
Jonathan Frech's user avatar
12 votes

Crown hundred crownty crown

JavaScript (Node.js), 50 bytes f=(n,p=1e3)=>n<p?(n+p+'').slice(1):'#'+f(n-p,p/10) Try it online! TIO was based on Arnauld's answer. Show 👑 as ...
tsh's user avatar
  • 34.9k
12 votes

Densely packed decimal (DPD) to decimal

JavaScript (ES6), 112 bytes All credit for this shorter version goes to @nwellnhof. Takes input as an integer. Returns an array of three decimal digits. ...
Arnauld's user avatar
  • 193k
12 votes

Decode a variable-length quantity

APL (dzaima/APL), 8 bytes 128(⊣⊥|) Try it online! How: ...
J. Sallé's user avatar
  • 3,453
12 votes

Convert height to US Men’s Jacket size

Python 2, 58 55 52 49 47 45 bytes -13 bytes with great contributions from Arnauld (thanks!!!), xnor and xash. Switched from Python 3 to Python 2 for an extra 2 bytes. Tried to profit from the ...
agtoever's user avatar
  • 2,941
11 votes

Convert phrases to reverse style

Reng v.3.3, 55 bytes Try it here! 1#zaií1ø ):Weq!vz1+#z br[zÀz/]; !o le"Wro/ !ob" ~;/ I can probably golf it by taking input until a space is found, as this ...
Conor O'Brien's user avatar
11 votes

How much Mana do I need?

05AB1E, 83 82 bytes .•Y<εΔ•¹нk©.•M₄P畲нkÌ.•Jrû •³нkD(i\ë4 3‡4+}.•A1Δ#•I4èkD(i\ë3LJ012‡Ì})ćsv®>y*;(î(+ Try it online! -1 thanks to Emigna. SOOOOOOO ...
Erik the Outgolfer's user avatar
11 votes

How much Mana do I need?

JavaScript (ES6), 157 156 116 112 100 99 97 bytes Takes input as an array of strings. ...
Shaggy's user avatar
  • 42.1k
11 votes

Count Like a Babylonian

Perl 6, 39 bytes -3 bytes thanks to nwellnhof {:60[.words>>.&{sum .ords X%151 X%27}]} Try it online! Uses the cuneiform characters. Explanation: ...
Jo King's user avatar
  • 47.2k
11 votes

Count Like a Babylonian

Jelly,  13  12 bytes ḲO%7C%13§ḅ60 A monadic link accepting a list of characters which yields an integer. Try it online! How? ...
Jonathan Allan's user avatar
11 votes

Converting Strings to Decimals (Gone Wrong)

Jelly, 5 bytes O_48Ḍ Try it online! How it works ...
caird coinheringaahin g's user avatar

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