Codeforces Round 146 (Div. 1)


A. LCM Challenge
time limit per test: 2 seconds
memory limit per test: 256 megabytes
input: standard input
output: standard output

Examples
Input
9
Output
504
Input
7
Output
210
----------------------------------------------------------------------------------------------------
B. Let's Play Osu!
time limit per test: 2 seconds
memory limit per test: 256 megabytes
input: standard input
output: standard output

Examples
Input
3
0.5 0.5 0.5
Output
2.750000000000000
Input
4
0.7 0.2 0.1 0.9
Output
2.489200000000000
Input
5
1 1 1 1 1
Output
25.000000000000000
----------------------------------------------------------------------------------------------------
C. Cyclical Quest
time limit per test: 3 seconds
memory limit per test: 512 megabytes
input: standard input
output: standard output

Examples
Input
baabaabaaa
5
a
ba
baa
aabaa
aaba
Output
7
5
7
3
5
Input
aabbaa
3
aa
aabb
abba
Output
2
3
3
----------------------------------------------------------------------------------------------------
D. Graph Game
time limit per test: 2 seconds
memory limit per test: 256 megabytes
input: standard input
output: standard output

Examples
Input
5
3 4
2 3
2 4
0 4
1 2
Output
13.166666666666666
Input
3
0 1
1 2
0 2
Output
6.000000000000000
Input
5
0 1
1 2
2 0
3 0
4 1
Output
13.166666666666666
----------------------------------------------------------------------------------------------------
E. Number Challenge
time limit per test: 3 seconds
memory limit per test: 512 megabytes
input: standard input
output: standard output

Examples
Input
2 2 2
Output
20
Input
4 4 4
Output
328
Input
10 10 10
Output
11536
----------------------------------------------------------------------------------------------------
