# | Problem | Pass Rate (passed user / total user) |
---|---|---|
13577 | Anya loves to encrypt |
|
13969 | Frieren and Magic |
|
13970 | Frieren and her Rizz |
|
Description
Anya wants to be a spy in the future, and Anya tries to encrypt the string by changing lowercase to uppercase and reversing each alphabet.
That is,
'a' first becomes 'A' and then becomes 'Z'.
'b' first becomes 'B' and then becomes 'Y'.
'c' first becomes 'C' and then becomes 'X'.
...
'y' first becomes 'Y' and then becomes 'B'.
'z' first becomes 'Z' and then becomes 'A'.
Input
Input contains only a line.
A 5 character word.
It is guarantee that the word contains only lower case alphabet.
Output
The encrypted word.
remember to print \n at the end of output.
Sample Input Download
Sample Output Download
Tags
Discuss
Description
Frieren wants to learn time magic.
She got really interested in learning it, but manipulating time is just too complicated for her.
Can you help her with your C programming skills?
Given input X which describes the total days, convert X to the number of years and seconds.
Note :
- 1 year is 365 days
- 1 day is 24 hours
- 1 hour is 3600 seconds
Input
Input contains 1 integer X
0 < X < 231
Output
Output 3 numbers, number of years in double datatype, years in float datatype, and seconds, separated by space.
The year should be in 6th decimal place format.
Don’t forget to print a new line '\n' after the end of the output.
Sample Input Download
Sample Output Download
Tags
Discuss
Description
Frieren wants to steal Josh's heart,
but Josh is a CS student, so he locked his heart with a password encrypted in binary
Can you help Frieren to decrypt the password?
Given a 6-digit binary, help her to encrypt the password to a character.
The first digit is a signed bit, as per the rules :
- If the signed bit is 1, make it lowercase
- If the signed bit is 0, make it uppercase
The last 5 digits determine the number. Convert the number to a character, as:
- Number 1 is ‘a’
- Number 2 is ‘b’
- Number 3 is ‘c’
- and so on … until 26 as ‘z’
All of them are based on alphabetic order.
A quick guide to convert 5 digits binary to integer, 01010 represents 10:
An ASCII table to help you figure out this problem :
Explanation of sample input :
010010 split into 0 and 10010
The signed bit is 0, which means it’s uppercase
10010 is 18, which is R in alphabetical order.
Follow-up: Can you do it without if-else?
Follow-up 2: How will you solve it if the character is assigned in the reverse order? Maybe it'll appear in your lab next Monday!
Follow-up 2 Example:
- Number 1 is ‘z’
- Number 2 is ‘y’
- Number 3 is ‘x’
- and so on … until 26 as ‘a’
Input
Input is 6 digit binary representation number (contain 1 or 0)
You can safely asume that the number is in the range 1 <= X <= 26
You might see the sample input if the description is not clear enough
Output
Output the encrypted character
Don't forget to print the new line