Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

Java programming challenge make sure you follow the output ... Given a string s, little Johnny defined the beauty of the string as the sum

Java programming challenge

make sure you follow the output ...

Given a string s, little Johnny defined the beauty of the string as the sum of the beauty of the letters in it. The beauty of each letter is an integer between 1 and 26, inclusive, and no two letters have the same beauty. Johnny doesn't care about whether letters are uppercase or lowercase, so that doesn't affect the beauty of a letter. (Uppercase 'F' is exactly as beautiful as lowercase 'f', for example.) You're a student writing a report on the youth of this famous hacker. You found the string that Johnny considered most beautiful. What is the maximum possible beauty of this string? Input:

Your program should read lines from standard input. Each line is a string.

Output:

Print out the maximum beauty for the string.

Test 1

Test Input

Download Test Input

ABbCcc

Expected Output

Download Test Output

152

Test 2

Test Input

Download Test Input

Ignore punctuation, please :)

Expected Output

Download Test Output

491

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Professional Microsoft SQL Server 2014 Administration

Authors: Adam Jorgensen, Bradley Ball

1st Edition

111885926X, 9781118859261

More Books

Students also viewed these Databases questions

Question

How do modern Dashboards differ from earlier implementations?

Answered: 1 week ago