April Fools Day Contest


A. Mysterious numbers - 1
time limit per test: 2 seconds
memory limit per test: 256 megabytes
input: standard input
output: standard output

Examples
Input
3 14
Output
44
Input
27 12
Output
48
Input
100 200
Output
102
----------------------------------------------------------------------------------------------------
B. Star
time limit per test: 2 seconds
memory limit per test: 256 megabytes
input: standard input
output: standard output

Examples
Input
2
Output
13
----------------------------------------------------------------------------------------------------
C. A Piece of Cake
time limit per test: 2 seconds
memory limit per test: 256 megabytes
input: standard input
output: standard output

Examples
Input
4 1 2 3 4
Output
30
----------------------------------------------------------------------------------------------------
D. Broken checker
time limit per test: 2 seconds
memory limit per test: 256 megabytes
input: standard input
output: standard output

No test samples are available for this problem
----------------------------------------------------------------------------------------------------
E. MYSTERIOUS LANGUAGE
time limit per test: 2 seconds
memory limit per test: 256 megabytes
input: standard input
output: standard output

No test samples are available for this problem
----------------------------------------------------------------------------------------------------
F. ucyhf
time limit per test: 2 seconds
memory limit per test: 64 megabytes
input: standard input
output: standard output

Examples
Input
1
Output
13
----------------------------------------------------------------------------------------------------
G. Mysterious numbers - 2
time limit per test: 2 seconds
memory limit per test: 256 megabytes
input: standard input
output: standard output

Examples
Input
2 3 2
Output
5
Input
13 14 1
Output
14
Input
14 5 9
Output
464
Input
17 18 3
Output
53
----------------------------------------------------------------------------------------------------
H. A polyline
time limit per test: 2 seconds
memory limit per test: 256 megabytes
input: standard input
output: standard output

Examples
Input
1 0
Output
0 0
Input
2 15
Output
3 0
Input
4 160
Output
12 12
----------------------------------------------------------------------------------------------------
