Simple and Quick
Statement
Goal
Given a list of integers, multiply the even integers by 3 and the odd integers with 5. Return the sum of all the items after the multiplication.Input
Line 1: An integer n for the number of integers.
Line 2: Integers of the list
Line 2: Integers of the list
Output
Sum of resulted list with odds multiplied by 5 and evens by 3.
Constraints
0<n<=1000
Example
Input
10 4 6 2 7 9 0 10 -1 8 4
Output
177
Game modes
Shortest
Test cases
Test 1 Test
Input
10
4
6
2
7
9
0
10
-1
8
4
Output
177
Validator 1 Validator
Input
10
4
6
2
7
9
0
10
-1
8
4
Output
177
Test 2 Test
Input
1
4
Output
12
Validator 2 Validator
Input
1
4
Output
12
Test 3 Test
Input
4
-4
-9
-8
3
Output
-66
Validator 3 Validator
Input
4
-4
-9
-8
3
Output
-66
Test 4 Test
Input
4
1
1
1
1
Output
20
Validator 4 Validator
Input
4
1
1
1
1
Output
20
Solution language
Solution
Stub generator input