Codeforces Round 146 (Div. 2)


A. Boy or Girl
time limit per test: 1 second
memory limit per test: 256 megabytes
input: standard input
output: standard output

Examples
Input
wjmzbmr
Output
CHAT WITH HER!
Input
xiaodao
Output
IGNORE HIM!
Input
sevenkplus
Output
CHAT WITH HER!
----------------------------------------------------------------------------------------------------
B. Easy Number Challenge
time limit per test: 2 seconds
memory limit per test: 256 megabytes
input: standard input
output: standard output

Examples
Input
2 2 2
Output
20
Input
5 6 7
Output
1520
----------------------------------------------------------------------------------------------------
C. 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
----------------------------------------------------------------------------------------------------
D. 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
----------------------------------------------------------------------------------------------------
E. 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
----------------------------------------------------------------------------------------------------
