Python 2 (46 + 271 = 327)
Codice:
print open('f').read().decode('zip').split(';')[input()]
File f
, contenente il seguente cestino binario (questi sono i codici char)
120, 156, 101, 146, 219, 21, 195, 32, 12, 67, 87, 233, 8, 193, 188, 204, 201, 254, 123, 21, 40, 46, 146, 253, 65, 163, 171, 10, 98, 199, 188, 233, 149, 87, 62, 243, 247, 179, 158, 121, 174, 50, 87, 157, 171, 205, 213, 231, 210, 181, 118, 66, 119, 70, 119, 74, 119, 78, 119, 82, 119, 86, 127, 233, 147, 183, 29, 182, 103, 156, 103, 122, 76, 36, 19, 249, 68, 167, 56, 78, 49, 81, 77, 52, 19, 118, 110, 210, 235, 100, 19, 197, 68, 53, 209, 76, 116, 19, 250, 23, 247, 36, 56, 107, 192, 139, 30, 208, 114, 211, 183, 96, 172, 121, 87, 123, 253, 6, 90, 175, 66, 23, 118, 66, 15, 216, 6, 118, 130, 205, 96, 63, 216, 18, 119, 197, 141, 185, 222, 6, 146, 36, 76, 138, 16, 101, 162, 66, 84, 29, 225, 153, 157, 254, 163, 90, 100, 32, 229, 135, 136, 106, 201, 226, 104, 16, 225, 136, 22, 38, 70, 97, 204, 140, 133, 177, 50, 246, 251, 33, 23, 170, 71, 97, 204, 140, 133, 177, 50, 54, 198, 206, 168, 14, 253, 155, 195, 187, 135, 55, 220, 103, 145, 199, 69, 230, 188, 157, 225, 63, 44, 207, 121, 25, 53, 26, 110, 75, 247, 9, 95, 170, 27, 187, 248, 201, 75, 28, 126, 152, 255, 111, 232, 41, 56, 62, 147, 130, 35, 193, 201, 193, 41, 193, 169, 193, 105, 193, 209, 80, 79, 172, 153, 111, 72, 188, 36, 241, 158, 196, 171, 18, 111, 203, 185, 16, 95, 151, 67, 8, 97
Base64:
eJxlktsVwyAMQ1fpCMG8zMn+exUoLpL9QaOrCmLHvOmVVz7z97Oeea4yV52rzdXn0rV2QndGd0p3
TndSd1Z/6ZO3HbZnnGd6TCQT+USnOE4xUU00E3Zu0utkE8VENdFMdBP6F/ckOGvAix7QctO3YKx5
V3v9BlqvQhd2Qg/YBnaCzWA/2BJ3xY253gaSJEyKEGWiQlQd4Zmd/qNaZCDlh4hqyeJoEOGIFiZG
YcyMhbEy9vshF6pHYcyMhbEyNsbOqA79m8O7hzfcZ5HHRea8neE/LM95GTUabkv3CV+qG7v4yUsc
fpj/b+gpOD6TgiPBycEpwanBacHRUE+smW9IvCTxnsSrEm/LuRBfl0MIYQ==
Su richiesta, questo è ora un programma completo piuttosto che una funzione.
Vecchia risposta: Python (Naive baseline, 422):
f=lambda n:'eJxlktsVwyAMQ1fpCMG8zMn+exUoLpL9QaOrCmLHvOmVVz7z97Oeea4yV52rzdXn0rV2QndGd0p3TndSd1Z/6ZO3HbZnnGd6TCQT+USnOE4xUU00E3Zu0utkE8VENdFMdBP6F/ckOGvAix7QctO3YKx5V3v9BlqvQhd2Qg/YBnaCzWA/2BJ3xY253gaSJEyKEGWiQlQd4Zmd/qNaZCDlh4hqyeJoEOGIFiZGYcyMhbEy9vshF6pHYcyMhbEyNsbOqA79m8O7hzfcZ5HHRea8neE/LM95GTUabkv3CV+qG7v4yUscfpj/b+gpOD6TgiPBycEpwanBacHRUE+smW9IvCTxnsSrEm/LuRBfl0MIYQ=='.decode('base64').decode('zip').split(';')[n]
Contenuto della zip:
>>>'eJxlktsVwyAMQ1fpCMG8zMn+exUoLpL9QaOrCmLHvOmVVz7z97Oeea4yV52rzdXn0rV2QndGd0p3TndSd1Z/6ZO3HbZnnGd6TCQT+USnOE4xUU00E3Zu0utkE8VENdFMdBP6F/ckOGvAix7QctO3YKx5V3v9BlqvQhd2Qg/YBnaCzWA/2BJ3xY253gaSJEyKEGWiQlQd4Zmd/qNaZCDlh4hqyeJoEOGIFiZGYcyMhbEy9vshF6pHYcyMhbEyNsbOqA79m8O7hzfcZ5HHRea8neE/LM95GTUabkv3CV+qG7v4yUscfpj/b+gpOD6TgiPBycEpwanBacHRUE+smW9IvCTxnsSrEm/LuRBfl0MIYQ=='.decode('base64').decode('zip')
';1;2;2 1;2 2;2 3;2 4;2 5;2 6;2 7;2 8;2 8 1;2 8 2;2 8 3;2 8 4;2 8 5;2 8 6;2 8 7;2 8 8;2 8 8 1;2 8 8 2;2 8 9 2;2 8 10 2;2 8 11 2;2 8 13 1;2 8 13 2;2 8 14 2;2 8 15 2;2 8 16 2;2 8 18 1;2 8 18 2;2 8 18 3;2 8 18 4;2 8 18 5;2 8 18 6;2 8 18 7;2 8 18 8;2 8 18 8 1;2 8 18 8 2;2 8 18 9 2;2 8 18 10 2;2 8 18 12 1;2 8 18 13 1;2 8 18 13 2;2 8 18 15 1;2 8 18 16 1;2 8 18 18;2 8 18 18 1;2 8 18 18 2;2 8 18 18 3;2 8 18 18 4;2 8 18 18 5;2 8 18 18 6;2 8 18 18 7;2 8 18 18 8;2 8 18 18 8 1;2 8 18 18 8 2;2 8 18 18 9 2;2 8 18 19 9 2;2 8 18 21 8 2;2 8 18 22 8 2;2 8 18 23 8 2;2 8 18 24 8 2;2 8 18 25 8 2;2 8 18 25 9 2;2 8 18 27 8 2;2 8 18 28 8 2;2 8 18 29 8 2;2 8 18 30 8 2;2 8 18 31 8 2;2 8 18 32 8 2;2 8 18 32 9 2;2 8 18 32 10 2;2 8 18 32 11 2;2 8 18 32 12 2;2 8 18 32 13 2;2 8 18 32 14 2;2 8 18 32 15 2;2 8 18 32 17 1;2 8 18 32 18 1;2 8 18 32 18 2;2 8 18 32 18 3;2 8 18 32 18 4;2 8 18 32 18 5;2 8 18 32 18 6;2 8 18 32 18 7;2 8 18 32 18 8;2 8 18 32 18 8 1;2 8 18 32 18 8 2;2 8 18 32 18 9 2;2 8 18 32 18 10 2;2 8 18 32 20 9 2;2 8 18 32 21 9 2;2 8 18 32 22 9 2;2 8 18 32 24 8 2;2 8 18 32 25 8 2;2 8 18 32 25 9 2;2 8 18 32 27 8 2;2 8 18 32 28 8 2;2 8 18 32 29 8 2;2 8 18 32 30 8 2;2 8 18 32 31 8 2;2 8 18 32 32 8 2;2 8 18 32 32 10 1;2 8 18 32 32 10 2;2 8 18 32 32 11 2;2 8 18 32 32 12 2;2 8 18 32 32 13 2;2 8 18 32 32 14 2;2 8 18 32 32 15 2;2 8 18 32 32 16 2;2 8 18 32 32 18 1;2 8 18 32 32 18 2;2 8 18 32 32 18 3;2 8 18 32 32 18 4;2 8 18 32 32 18 5;2 8 18 32 32 18 6;2 8 18 32 32 18 7;2 8 18 32 32 18 8'
>>>len(_)
1478
E un breve test:
map(f, range(119))
Out[48]:
['',
'1',
'2',
'2 1',
'2 2',
'2 3',
'2 4',
'2 5',
'2 6',
'2 7',
'2 8',
'2 8 1',
'2 8 2',
'2 8 3',
'2 8 4',
'2 8 5',
'2 8 6',
'2 8 7',
'2 8 8',
'2 8 8 1',
'2 8 8 2',
'2 8 9 2',
'2 8 10 2',
'2 8 11 2',
'2 8 13 1',
'2 8 13 2',
'2 8 14 2',
'2 8 15 2',
'2 8 16 2',
'2 8 18 1',
'2 8 18 2',
'2 8 18 3',
'2 8 18 4',
'2 8 18 5',
'2 8 18 6',
'2 8 18 7',
'2 8 18 8',
'2 8 18 8 1',
'2 8 18 8 2',
'2 8 18 9 2',
'2 8 18 10 2',
'2 8 18 12 1',
'2 8 18 13 1',
'2 8 18 13 2',
'2 8 18 15 1',
'2 8 18 16 1',
'2 8 18 18',
'2 8 18 18 1',
'2 8 18 18 2',
'2 8 18 18 3',
'2 8 18 18 4',
'2 8 18 18 5',
'2 8 18 18 6',
'2 8 18 18 7',
'2 8 18 18 8',
'2 8 18 18 8 1',
'2 8 18 18 8 2',
'2 8 18 18 9 2',
'2 8 18 19 9 2',
'2 8 18 21 8 2',
'2 8 18 22 8 2',
'2 8 18 23 8 2',
'2 8 18 24 8 2',
'2 8 18 25 8 2',
'2 8 18 25 9 2',
'2 8 18 27 8 2',
'2 8 18 28 8 2',
'2 8 18 29 8 2',
'2 8 18 30 8 2',
'2 8 18 31 8 2',
'2 8 18 32 8 2',
'2 8 18 32 9 2',
'2 8 18 32 10 2',
'2 8 18 32 11 2',
'2 8 18 32 12 2',
'2 8 18 32 13 2',
'2 8 18 32 14 2',
'2 8 18 32 15 2',
'2 8 18 32 17 1',
'2 8 18 32 18 1',
'2 8 18 32 18 2',
'2 8 18 32 18 3',
'2 8 18 32 18 4',
'2 8 18 32 18 5',
'2 8 18 32 18 6',
'2 8 18 32 18 7',
'2 8 18 32 18 8',
'2 8 18 32 18 8 1',
'2 8 18 32 18 8 2',
'2 8 18 32 18 9 2',
'2 8 18 32 18 10 2',
'2 8 18 32 20 9 2',
'2 8 18 32 21 9 2',
'2 8 18 32 22 9 2',
'2 8 18 32 24 8 2',
'2 8 18 32 25 8 2',
'2 8 18 32 25 9 2',
'2 8 18 32 27 8 2',
'2 8 18 32 28 8 2',
'2 8 18 32 29 8 2',
'2 8 18 32 30 8 2',
'2 8 18 32 31 8 2',
'2 8 18 32 32 8 2',
'2 8 18 32 32 10 1',
'2 8 18 32 32 10 2',
'2 8 18 32 32 11 2',
'2 8 18 32 32 12 2',
'2 8 18 32 32 13 2',
'2 8 18 32 32 14 2',
'2 8 18 32 32 15 2',
'2 8 18 32 32 16 2',
'2 8 18 32 32 18 1',
'2 8 18 32 32 18 2',
'2 8 18 32 32 18 3',
'2 8 18 32 32 18 4',
'2 8 18 32 32 18 5',
'2 8 18 32 32 18 6',
'2 8 18 32 32 18 7',
'2 8 18 32 32 18 8']