Z22578

{
    "Z1K1": "Z2",
    "Z2K1": {
        "Z1K1": "Z6",
        "Z6K1": "Z22578"
    },
    "Z2K2": {
        "Z1K1": "Z14",
        "Z14K1": "Z22576",
        "Z14K3": {
            "Z1K1": "Z16",
            "Z16K1": "Z600",
            "Z16K2": "function Z22576( Z22576K1, Z22576K2, Z22576K3, Z22576K4, Z22576K5, Z22576K6, Z22576K7, Z22576K8, Z22576K9, Z22576K10) {\r\n\tconst integers_spellings_list = Z22576K1;\r\n\tconst teens_spellings_list = prependEmptyString(Z22576K2);\r\n\tconst tys_spellings_list = prependEmptyString(Z22576K3);\r\n\tconst hundreds_spellings_list = prependEmptyString(Z22576K4);\r\n\tconst zero = integers_spellings_list[0];\r\n\tconst one = integers_spellings_list[1];\r\n\tconst integers_spellings_list2 = prependEmptyString(Z22576K5);\r\n\tconst thousands = Z22576K6;\r\n\tconst prefixes = Z22576K7;\r\n\tconst lion = Z22576K8;\r\n\tconst liard = Z22576K9;\r\n\t\r\n\tconst isPolish = Z22576K5.length === 0;\r\n\r\n\tintegers_spellings_list[0] = \"\";\r\n\t\r\n\t\r\n\tfunction prependEmptyString(list) {\r\n\t\tconst newList = [ \"\" ];\r\n\t\tfor(const e of list) {\r\n\t\t\tnewList.push(e);\r\n\t\t}\r\n\t\treturn newList;\r\n\t}\r\n\r\n\tfunction spell_block(x, block_index) {\r\n\t\tlet hundreds_spelling = \"\", tens_and_ones_spelling = \"\", tens_spelling = \"\", ones_spelling = \"\";\r\n\t\tconst hundreds = x / 100n;\r\n\t\tif(hundreds != 0n) {\r\n\t\t\thundreds_spelling = hundreds_spellings_list[hundreds];\r\n\t\t}\r\n\r\n\t\tconst tens_and_ones = x % 100n;\r\n\t\tif(tens_and_ones \u003E= 11n \u0026\u0026 tens_and_ones \u003C= 19n) {\r\n\t\t\ttens_and_ones_spelling = teens_spellings_list[tens_and_ones - 10n];\r\n\t\t} else {\r\n\t\t\tconst tens = tens_and_ones / 10n;\r\n\t\t\tconst ones = tens_and_ones % 10n;\r\n\t\t\tif(tens != 0n) {\r\n\t\t\t\ttens_spelling = tys_spellings_list[tens];\r\n\t\t\t}\r\n\t\t\tif(ones != 0n) {\r\n\t\t\t\tones_spelling = !isPolish \u0026\u0026 block_index==1\r\n\t\t\t\t\t? integers_spellings_list2[ones] \r\n\t\t\t\t\t: integers_spellings_list[ones];\r\n\t\t\t}\r\n\t\t\tif(tens_spelling != \"\" \u0026\u0026 ones_spelling != \"\") {\r\n\t\t\t\ttens_and_ones_spelling = tens_spelling + \" \" + ones_spelling;\r\n\t\t\t} else if(tens_spelling != \"\" \u0026\u0026 ones_spelling == \"\") {\r\n\t\t\t\ttens_and_ones_spelling = tens_spelling;\r\n\t\t\t} else if(tens_spelling == \"\" \u0026\u0026 ones_spelling != \"\") {\r\n\t\t\t\ttens_and_ones_spelling = ones_spelling;\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\tif(hundreds_spelling != \"\" \u0026\u0026 tens_and_ones_spelling != \"\") {\r\n\t\t\treturn hundreds_spelling + \" \" + tens_and_ones_spelling;\r\n\t\t} else {\r\n\t\t\treturn hundreds_spelling + tens_and_ones_spelling;\r\n\t\t}\r\n\t}\r\n\r\n\tconst x = Z22576K10;\r\n\r\n\tconst blocks_names =\r\n\t\t[\r\n\t\t\t[\"\", \"\", \"\"],\r\n\t\t\tthousands,\r\n\t\t];\r\n\tfor (const prefix of prefixes) {\r\n\t\tblocks_names.push([\r\n\t\t\tprefix + lion[0],\r\n\t\t\tprefix + lion[1],\r\n\t\t\tprefix + lion[2]\r\n\t\t]);\r\n\t\tblocks_names.push([\r\n\t\t\tprefix + liard[0],\r\n\t\t\tprefix + liard[1],\r\n\t\t\tprefix + liard[2]\r\n\t\t]);\r\n\t}\r\n\tconst blocks_spelling = [];\r\n\r\n\tif(x == 0n) {\r\n\t\treturn zero;\r\n\t}\r\n\t\r\n\tlet x_remainder = x;\r\n\tfor(let i = 0; i != blocks_names.length; i++) {\r\n\t\tconst cur_block = x_remainder % 1000n;\r\n\t\tconst last_two_digits = cur_block % 100n;\r\n\t\tconst last_digit = cur_block % 10n;\r\n\t\tx_remainder = x_remainder / 1000n;\r\n\t\tlet cur_block_spelling = spell_block(cur_block, i);\r\n\t\tif(cur_block_spelling != \"\") {\r\n\t\t\tlet plural_case_id;\r\n\t\t\tif(cur_block == 1n) {\r\n\t\t\t\tplural_case_id = 0;\r\n\t\t\t} else if((last_digit == 2n || last_digit == 3n || last_digit == 4n) \u0026\u0026 last_two_digits != 12n \u0026\u0026 last_two_digits != 13n \u0026\u0026 last_two_digits != 14n) {\r\n\t\t\t\tplural_case_id = 1;\r\n\t\t\t} else {\r\n\t\t\t\tplural_case_id = 2;\r\n\t\t\t}\r\n\r\n\t\t\tconst oom_spelling = blocks_names[i][plural_case_id];\r\n\t\t\tif (oom_spelling != \"\" \u0026\u0026 cur_block_spelling != one) {\r\n\t\t\t\tcur_block_spelling += \" \" + oom_spelling;\r\n\t\t\t} else if (oom_spelling != \"\" \u0026\u0026 cur_block_spelling == one) {\r\n\t\t\t\tcur_block_spelling = oom_spelling;\r\n\t\t\t}\r\n\t\t\tblocks_spelling.push(cur_block_spelling);\r\n\t\t}\r\n\t}\r\n\r\n\treturn blocks_spelling.reverse().join(\" \");\r\n}"
        }
    },
    "Z2K3": {
        "Z1K1": "Z12",
        "Z12K1": [
            "Z11",
            {
                "Z1K1": "Z11",
                "Z11K1": "Z1002",
                "Z11K2": "Slavic languages cardinal, JS impl"
            }
        ]
    },
    "Z2K4": {
        "Z1K1": "Z32",
        "Z32K1": [
            "Z31"
        ]
    },
    "Z2K5": {
        "Z1K1": "Z12",
        "Z12K1": [
            "Z11"
        ]
    }
}