Skip to main content
Commonmark migration
Source Link

#Pyth - 31 bytes

Pyth - 31 bytes

Pretty simple, uses zip and modular indexing to get the switch. The actual calculation is really easy.

s@C,Jc"FtBo"2,h/Ksttz2tyKhxJ<z2

Test suite.

#Pyth - 31 bytes

Pretty simple, uses zip and modular indexing to get the switch. The actual calculation is really easy.

s@C,Jc"FtBo"2,h/Ksttz2tyKhxJ<z2

Test suite.

Pyth - 31 bytes

Pretty simple, uses zip and modular indexing to get the switch. The actual calculation is really easy.

s@C,Jc"FtBo"2,h/Ksttz2tyKhxJ<z2

Test suite.

Source Link
Maltysen
  • 25.8k
  • 4
  • 55
  • 127

#Pyth - 31 bytes

Pretty simple, uses zip and modular indexing to get the switch. The actual calculation is really easy.

s@C,Jc"FtBo"2,h/Ksttz2tyKhxJ<z2

Test suite.