Unknown Language Round 4


A. Hexagonal numbers
time limit per test: 2 seconds
memory limit per test: 64 megabytes
input: standard input
output: standard output

Examples
Input
2
Output
6
Input
5
Output
45
----------------------------------------------------------------------------------------------------
B. Gnikool Ssalg
time limit per test: 2 seconds
memory limit per test: 64 megabytes
input: standard input
output: standard output

Examples
Input
secrofedoc
Output
codeforces
Input
!ssalg-gnikool5
Output
5looking-glass!
----------------------------------------------------------------------------------------------------
C. Decimal sum
time limit per test: 2 seconds
memory limit per test: 64 megabytes
input: standard input
output: standard output

Examples
Input
5
1
2
3
4
5
Output
15
Input
7
100
5
45
86
14
20
30
Output
300
----------------------------------------------------------------------------------------------------
D. Exponentiation
time limit per test: 2 seconds
memory limit per test: 64 megabytes
input: standard input
output: standard output

Examples
Input
2
5
40
Output
32
Input
2
5
26
Output
6
----------------------------------------------------------------------------------------------------
E. Tribonacci numbers
time limit per test: 2 seconds
memory limit per test: 64 megabytes
input: standard input
output: standard output

Examples
Input
4
Output
2
Input
9
Output
18
----------------------------------------------------------------------------------------------------
F. Prime factorization
time limit per test: 2 seconds
memory limit per test: 64 megabytes
input: standard input
output: standard output

Examples
Input
245
Output
5 7 7 
Input
13
Output
13 
----------------------------------------------------------------------------------------------------
G. CAPS LOCK ON
time limit per test: 2 seconds
memory limit per test: 64 megabytes
input: standard input
output: standard output

Examples
Input
cOdEfOrCeS
Output
CODEFORCES
Input
ulr#4:befunge-RULES!
Output
ULR#4:BEFUNGE-RULES!
----------------------------------------------------------------------------------------------------
H. Balanced brackets
time limit per test: 2 seconds
memory limit per test: 64 megabytes
input: standard input
output: standard output

Examples
Input
(()(()))()
Output
YES
Input
())()
Output
NO
----------------------------------------------------------------------------------------------------
I. Array sorting
time limit per test: 2 seconds
memory limit per test: 64 megabytes
input: standard input
output: standard output

Examples
Input
5
7
1
9
7
3
Output
1 3 7 7 9 
Input
10
60
1
60
1
60
1
60
1
60
1
Output
1 1 1 1 1 60 60 60 60 60 
----------------------------------------------------------------------------------------------------
J. Date calculation
time limit per test: 2 seconds
memory limit per test: 64 megabytes
input: standard input
output: standard output

Examples
Input
2011
324
Output
20 11
Input
2012
274
Output
30 9
----------------------------------------------------------------------------------------------------
