Description
For elephants, we use the "EMI" (Elephant Mass Index) to assess their health status.
To calculate an elephant's EMI, we use the formula below:
w
= weight, h
= height.
Elephants perform calculations using the double data type, and the output should be formatted to 6 decimal places.
You don't need to worry about the units; just calculate using the given values.
Input
The first line contains two integers: w
, and h
, respectively.
1 ≤ h
≤ w
≤ 10000
Output
Output the answer following the specified formatting rules.
Note that you do NOT need to print '\n' at the end of the output.
Sample Input Download
Sample Output Download
Tags
Discuss
Description
Hints:
- If you're not familiar with character arrays, you can try using 5 characters to store the data instead.
- There's another way to handle the overflow issue without using if-else, such as using modulo.
- You can brute-force the solution by repeating the same process 5 times to replace the for-loop.
EECS (Elephant EnCryption System) is an encryption method that allows elephants to communicate using ciphertext without letting other animals understand the content.
The rules of EECS are as follows:
- Shift each character in the string
s
byk
positions in the alphabetical order. For example,
Shifting 'a' by 3 positions results in 'd'.
Shifting 'w' by 6 positions results in 'c'. - Convert every character in the new string from lowercase to uppercase. For example,
'g' becomes 'G'.
As an elephant, it’s essential to learn EECS. Now, given a word s
of length 5 and a shift distance k
, output the encrypted string after applying the EECS.
You can try solving the problem without needing to know the exact ASCII values of the letters.
Input
The first line contains a single integer k
.
1 ≤ k
≤ 26
The second line contains a single string s
.
It is guaranteed that all characters in s
are lowercase letters and the length of the string is 5.
Output
Output the encrypted string.
Note that you do NOT need to print '\n' at the end of the output.