~/algor $ cat duels/565
Duel #565
A 1v1 battle on the problem «Average of positive elements».
BATTLE OVER
Winner: Sojida Otaqulova
Solved in 2 min 38 s
Winner: Sojida Otaqulova
The winner was the first to solve it correctly — in 2 min 38 s.
Array-10
Array
Easy
1000 ms
128 MB
Average of positive elements
A positive integer $n$ and an array of $n$ integers are given. Find the arithmetic mean of all positive ($a_{i} \gt 0$) numbers of the array.
Sample tests
Input #1
5 4 -2 8 0 6
Output #1
6.00
Input #2
3 -5 -1 0
Output #2
0.00
Battle results compared
1v1 reportSojida Otaqulova
@sojida_otaqulova
Winner (1st place)
Malika Sharipova
@malikaxanim_08
Not solved
02:38
Solve time
—
2
Submissions
0
C++ (GCC 15)
Language
—
3 ms
Run time
—
Submission timeline (2)
All submissions
S
Sojida Otaqulova
+02:38
WIN
Accepted
C++ (GCC 15)
· 3 ms
· 4.2 MB
S
Sojida Otaqulova
+01:44
Wrong answer (test 2)
C++ (GCC 15)
· 3 ms
· 4.1 MB
Sojida Otaqulova won
The 1v1 battle ended after a hard fight.
S
Sojida Otaqulova
Solution: 2 min 38 s
Rating: 1272 (+19)
M
Malika Sharipova
Solution: Not solved
Rating: 1292 (-19)
RIVAL FOUND!
1v1 DUEL IS STARTING
VS
15 minutes
Loading the arena...