Skip to main content
Tuesday (24.11.2026) at 20:00: ALGOR Contest: Round #4 (Special Challenge) starts!

~/algor $ cat duels/565

Duel #565

A 1v1 battle on the problem «Average of positive elements».

@sojida_otaqulova · Elo: 1272 (+19) · Pupil
1st place · 2 min 38 s
Tests: 20/20 (100%)
BATTLE OVER Winner: Sojida Otaqulova Solved in 2 min 38 s
Pupil · Elo: 1292 (-19) · @malikaxanim_08
No attempts
Tests: 0/20 (0%)

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.

Finding the arithmetic mean of the positive numbers of an 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 report
Sojida 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

Sojida Otaqulova 1253 Elo
VS 15 minutes
Malika Sharipova 1307 Elo

Loading the arena...