1027 - I2P CS 2016 Lee Lab2 Scoreboard

Time

2016/10/03 15:40:00 2016/10/03 17:10:00

Clarification

# Problem Asker Description Reply Replier Reply Time For all team

# Problem Pass Rate (passed user / total user)
11122 I2P Lab2-1
11125 I2P Lab2-2

11122 - I2P Lab2-1   

Description

The input is a four-digit integer N that consists of digits 1-9 except 0. For example, 1234 is such a number. The task is to rotate the digits of N left an right to get two new four-digit number M and P, and compute the product of the M and P. For example, if N is 1234, then M is 2341and P is 4123, and the answer should be 9651943.

 

Input

A four-digit integer consisting of 1-9 except 0

 

Output

The product of its left rotation and its right rotation

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

 

Sample Input  Download

Sample Output  Download

Tags




Discuss




11125 - I2P Lab2-2   

Description

The input is a three-digit integer N that consists of digits 1-9 except 0. For example, 489 is such a number. The task is to reverse the order of the digits of N to get a new three-digit number M, and compute the average of the N and M. For example, if N is 489, then M is 984, and the answer should be 736.5.

Input

A three-digit integer consisting of 1-9 except 0

Output

The average of the input number and its reversal
The answer should be expressed as a floating point number with precision to the first decimal place. For example, 333.0 or 736.5

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

Sample Input  Download

Sample Output  Download

Tags




Discuss