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

~/algor $ cat duels/550

Duel #550

A 1v1 battle on the problem «Binary to decimal».

@sojida_otaqulova · Elo: 1257 (-16) · Pupil
No attempts
Tests: 0/20 (0%)
BATTLE OVER Winner: Malika Sharipova Solved in 1 min 41 s
Pupil · Elo: 1297 (+16) · @malikaxanim_08
1st place · 1 min 41 s
Tests: 20/20 (100%)

Winner: Malika Sharipova

The winner was the first to solve it correctly — in 1 min 41 s.

While-31 While Easy 1000 ms 64 MB

Binary to decimal

A number $n$ written in the binary numeral system is given (it consists only of the digits $0$ and $1$). Convert it to decimal: the last digit is multiplied by $2^{0}$, the one before it by $2^{1}$, the next by $2^{2}$ and so on, and everything is added up.

$$1011_{2} = 1 * 2^{3} + 0 * 2^{2} + 1 * 2^{1} + 1 * 2^{0} = 11$$

Converting binary digits to decimal by powers of two

Sample tests

Input #1
1011
Output #1
11
Input #2
100000
Output #2
32

Battle results compared

1v1 report
Sojida Otaqulova
@sojida_otaqulova
Not solved
Malika Sharipova
@malikaxanim_08
Winner (1st place)
— Solve time 01:41
0 Submissions 1
— Language C++ (GCC 15)
— Run time 4 ms

Submission timeline (1)

All submissions
M Malika Sharipova +01:41
WIN Accepted
C++ (GCC 15) · 4 ms · 3.9 MB

Malika Sharipova won

The 1v1 battle ended after a hard fight.

S Sojida Otaqulova
Solution: Not solved
Rating: 1257 (-16)
M Malika Sharipova
Solution: 1 min 41 s
Rating: 1297 (+16)
RIVAL FOUND!

1v1 DUEL IS STARTING

Sojida Otaqulova 1273 Elo
VS 15 minutes
Malika Sharipova 1307 Elo

Loading the arena...