100% Guaranteed Results


Project
$ 15.99
Category:

Description

5/5 – (1 vote)

This problem is a programming version of Problem 56 from projecteuler.net
A googol (10100) is a massive number: one followed by one-hundred zeros. 100100 is almost unimaginably large: one followed by two-hundred zeros. Despite their size, the sum of the digits in each number is only 1.
Considering natural numbers of the form, ab, where a,b < N, what is the maximum digital sum?
Input Format
Input contains an integer N
Output Format
Print the answer corresponding to the test case.
Constraints
5 ≤ N ≤ 200
Sample Input

Sample Output

Explanation
44 = 256 and 2 + 5 + 6 = 13, which is the maximum digital sum for this range.

Reviews

There are no reviews yet.

Be the first to review “Project”

Your email address will not be published. Required fields are marked *

Related products