You must write a program in Language A that will output the source code for a program in Language B which will then output the source code for a program in Language C and so on and so forth. The final program must output the x root y where x and y are the inputs e.g. in Python:

print(int(input()) ** (1/int(input())))

Your score is L / N where L is the total length of all your programs and N is the number of languages.

N must be greater or equal to 3 to allow for a proper challenge.

Different versions don't count as different languages

As usual, lowest score wins.

Example submission

# C++/brainfuck/Python, 223 points

## C++

    #include <iostream>

    int main() {

## brainfuck


## Python

    print(int(input()) ** (1/int(input())))

05AB1E/GolfScript/Jelly 11 6 bytes / 3 languages = 2


Both 05AB1E and GolfScript have the nice property that they do implicit prints of strings, so we only lose 3 bytes on them (because 05AB1E doesn't need the closing quote).

Also, my first 05AB1E, GolfScript, and Jelly programs.

|improve this answer|||||
  • \$\begingroup\$ Make that lua program a string literal, wrap it in an alert() and call it JavaScript for a 4th stack. You could then string literal that and put echo in front and call it php. \$\endgroup\$ – Draco18s no longer trusts SE Jun 2 '17 at 16:45
  • \$\begingroup\$ @Draco18s Working on a better replacement \$\endgroup\$ – L3viathan Jun 2 '17 at 16:46
  • \$\begingroup\$ You can golf the Jelly program to İ*@. \$\endgroup\$ – Business Cat Jun 2 '17 at 17:11
  • \$\begingroup\$ And it may be possible to use the Jelly code page for all of them, since the important stuff for the first two are the quotes, which will be the same bytes as they're in the normal ASCII range \$\endgroup\$ – Business Cat Jun 2 '17 at 17:13
  • 1
    \$\begingroup\$ I can get the score arbitrarily close to 1 by adding HTML, PHP, and so on. \$\endgroup\$ – L3viathan Jun 2 '17 at 18:38

Not the answer you're looking for? Browse other questions tagged or ask your own question.