Codeforces Round 204 (Div. 2)


A. Jeff and Digits
time limit per test: 1 second
memory limit per test: 256 megabytes
input: standard input
output: standard output

Examples
Input
4
5 0 5 0
Output
0
Input
11
5 5 5 5 5 5 5 5 0 5 5
Output
5555555550
----------------------------------------------------------------------------------------------------
B. Jeff and Periods
time limit per test: 1 second
memory limit per test: 256 megabytes
input: standard input
output: standard output

Examples
Input
1
2
Output
1
2 0
Input
8
1 2 1 3 1 2 1 5
Output
4
1 2
2 4
3 0
5 0
----------------------------------------------------------------------------------------------------
C. Jeff and Rounding
time limit per test: 1 second
memory limit per test: 256 megabytes
input: standard input
output: standard output

Examples
Input
3
0.000 0.500 0.750 1.000 2.000 3.000
Output
0.250
Input
3
4469.000 6526.000 4864.000 9356.383 7490.000 995.896
Output
0.279
----------------------------------------------------------------------------------------------------
D. Jeff and Furik
time limit per test: 1 second
memory limit per test: 256 megabytes
input: standard input
output: standard output

Examples
Input
2
1 2
Output
0.000000
Input
5
3 5 2 4 1
Output
13.000000
----------------------------------------------------------------------------------------------------
E. Jeff and Brackets
time limit per test: 1 second
memory limit per test: 256 megabytes
input: standard input
output: standard output

Examples
Input
2 6
1 2
2 1
Output
12
Input
1 10000000
2
3
Output
25000000
----------------------------------------------------------------------------------------------------
