-
When little Joshua was in his darkest moments while studying for exams, he found this video. Unfortunately, it didn’t save him from the harsh reality of studying for exams, but it gave him a problem idea. Your task is to solve that problem. If it’s not obvious what the problem is, listen to the video for a while, and it should become clear.
Input
The first line of input contains the integer $N$ ($1 \leq N \leq 1000$).
The second line contains the integers $l_1, l_2, \dots , l_N$ ($1 \leq l_i \leq 1000$).
Output
Print a single integer: the answer to the problem.
Scoring
Your solution will be tested on multiple test cases. To solve the problem, you must pass all test cases.
Sample Input 1 Sample Output 1 4 1 1 1 1
2
Sample Input 2 Sample Output 2 5 1 2 2 20 5
20
Sample Input 3 Sample Output 3 4 5 2 3 1
6
Sample Input 4 Sample Output 4 1 5
5
-
To solve the problems, you can either start a virtual contest or register for regular practice. A virtual contest simulates a participation in the original contest with a duration of 02:00:00, while regular practice lets you submit solutions without any constraints.
You must log in to register. - A Accelerated Learning
- D Divisibility test
- E Easy Query
- F Fact Check
- G Open Wide
- H High Noon
- K You wouldn't kill a kitten
- M Make Kattis Happy
- P Problemhunt?
- S Solution Presentation