1519 - I2P (I) 2018_Yang_Lab1_補考 Scoreboard

Time

2018/10/05 16:00:00 2018/10/05 17:30:00

Clarification

# Problem Asker Description Reply Replier Reply Time For all team

# Problem Pass Rate (passed user / total user)
10741 The Encoded Word
11581 Push Push
12008 product of ascii

10741 - The Encoded Word   

Description

The input is a three-digit integer N that consists of digits 1-9 except 0. The task is to use the following rule to encode the input number:

First digit =>  even: 'A', odd: 'B'
Second digit => even: 'C', odd: 'D'
Third digit => even: 'E', odd: 'F'

For example, if the input is 489, the output should be  ACF because 4 is even, 8 is even, and 9 is odd.

Hints:
1. Given an integer x and two values M and N, we can use the following equation to select one of M and N according to x being even or odd.

           y = (x%2)*M + ((x+1)%2)*N;

That is, if x is odd, y will have value M; if x is even, y will get value N.

2. Characters like 'A', 'B', 'C' are constant values. We can use them in computations such as 0*'A' + 1*'B' or 'D' - 'A'.

Input

A three-digit integer consisting of only 1-9 but not 0

Output

The encoded three-letter word.
Note that you do not need to print ‘\n’ at the end of the output.

Sample Input  Download

Sample Output  Download

Tags

10401Contest



Discuss




11581 - Push Push   

Description

There are 2 positive integers A and B.

B is the number of pushing all digits of A right by 1 digit.

e.g. A = 5678, B = 8567

Please calculate the sum of A and B

 

Input

A is a 4-digit number

Output

A + B

Sample Input  Download

Sample Output  Download

Tags




Discuss




12008 - product of ascii   

Description

Input will be four characters.

Please output the product of those ASCII value in one line.

Input:

ABCD

Output:

19545240

 

Input

4 Characters char belongs to {A,B,C,D,E} set.

Output

Value of the product

Note that you need to print ‘\n’ at the end of the output.

Sample Input  Download

Sample Output  Download

Tags




Discuss