Skip to main content
Commonmark migration
Source Link

#Pyth, 30 25 bytes

Pyth, 30 25 bytes

jb.eu_GkbceQs*R/*FQ4"EDMC

Live demo and all test cases.

Cut off 5 bytes thanks to @Jakube!

Same algorithm as my K answer...but a lot shorter.

30-byte version:

jb.e?%k2_bbcjkm*/*FQ4d"EDMC"hQ

Live demo and all test cases for 50-byte version.

#Pyth, 30 25 bytes

jb.eu_GkbceQs*R/*FQ4"EDMC

Live demo and all test cases.

Cut off 5 bytes thanks to @Jakube!

Same algorithm as my K answer...but a lot shorter.

30-byte version:

jb.e?%k2_bbcjkm*/*FQ4d"EDMC"hQ

Live demo and all test cases for 50-byte version.

Pyth, 30 25 bytes

jb.eu_GkbceQs*R/*FQ4"EDMC

Live demo and all test cases.

Cut off 5 bytes thanks to @Jakube!

Same algorithm as my K answer...but a lot shorter.

30-byte version:

jb.e?%k2_bbcjkm*/*FQ4d"EDMC"hQ

Live demo and all test cases for 50-byte version.

added 328 characters in body
Source Link
kirbyfan64sos
  • 9.2k
  • 1
  • 26
  • 46

#Pyth, 3030 25 bytes

jb.e?%k2_bbcjkm*eu_GkbceQs*R/*FQ4d"EDMC"hQ*FQ4"EDMC

Live demo and all test cases.

Cut off 5 bytes thanks to @Jakube!

Same algorithm as my K answer...but 31 bytesa lot shorter.

30-byte version:

jb.e?%k2_bbcjkm*/*FQ4d"EDMC"hQ

Live demo and all test cases for 50-byte version.

#Pyth, 30 bytes

jb.e?%k2_bbcjkm*/*FQ4d"EDMC"hQ

Same algorithm as my K answer...but 31 bytes shorter.

Live demo and all test cases.

#Pyth, 30 25 bytes

jb.eu_GkbceQs*R/*FQ4"EDMC

Live demo and all test cases.

Cut off 5 bytes thanks to @Jakube!

Same algorithm as my K answer...but a lot shorter.

30-byte version:

jb.e?%k2_bbcjkm*/*FQ4d"EDMC"hQ

Live demo and all test cases for 50-byte version.

edited body
Source Link
kirbyfan64sos
  • 9.2k
  • 1
  • 26
  • 46

#Pyth, 30 bytes

jb.e?%k2_bbcjkm*/*FQ4d"EDMS"hQ*FQ4d"EDMC"hQ

Same algorithm as my K answer...but 31 bytes shorter.

Live demo and all test casesLive demo and all test cases.

#Pyth, 30 bytes

jb.e?%k2_bbcjkm*/*FQ4d"EDMS"hQ

Same algorithm as my K answer...but 31 bytes shorter.

Live demo and all test cases.

#Pyth, 30 bytes

jb.e?%k2_bbcjkm*/*FQ4d"EDMC"hQ

Same algorithm as my K answer...but 31 bytes shorter.

Live demo and all test cases.

Source Link
kirbyfan64sos
  • 9.2k
  • 1
  • 26
  • 46
Loading