After simplifying, and taking care to spell “forty” correctly.
let problem17d = "OneThousand".Length + "OneHundred".Length + "TwoHundred".Length + "ThreeHundred".Length + "FourHundred".Length + "FiveHundred".Length + "SixHundred".Length + "SevenHundred".Length + "EightHundred".Length + "NineHundred".Length + 99*("OneHundredAnd".Length + "TwoHundredAnd".Length + "ThreeHundredAnd".Length + "FourHundredAnd".Length + "FiveHundredAnd".Length + "SixHundredAnd".Length + "SevenHundredAnd".Length + "EightHundredAnd".Length + "NineHundredAnd".Length) + 10*("OneTwoThreeFourFiveSixSevenEightNineTenElevenTwelveThirteenFourteenFifteenSixteenSeventeenEighteenNineteen".Length + 10*("Twenty".Length + "Thirty".Length + "Forty".Length + "Fifty".Length + "Sixty".Length + "Seventy".Length + "Eighty".Length + "Ninety".Length) + 8*("OneTwoThreeFourFiveSixSevenEightNine".Length))
No comments:
Post a Comment