Skip to main content
LIVE CONTEST: Round #7 · Begin Marathon is live now! …

~/algor $ cat duels/874

Duel #874

A 1v1 battle on the problem «Expression with two operations».

@anjanli · Elo: 1141 (+20) · Newbie
Winner (technical win)
Tests: 0/20 (0%)
BATTLE OVER Winner: dilshodbek gulomov Technical win (the rival gave up)
@qurbonovmurodbek · Pupil · Elo: 1190 (-20)
Gave up (technical defeat)
Tests: 8/20 (40%)

Winner: dilshodbek gulomov

One of the players gave up — the winner gets a technical win.

Case-36 Case Medium 1000 ms 64 MB

Expression with two operations

An expression of the form is given, where and are the operations +, - or *. Compute its value by the rules of mathematics: multiplication is done before addition and subtraction, and operations of the same level are done from left to right.

The precedence of multiplication over addition

Sample tests

Input #1
2 + 3 * 4
Output #1
14
Input #2
10 - 4 - 3
Output #2
3

Battle results compared

1v1 report
dilshodbek gulomov
@anjanli
Winner (technical)
Murodbek Qurbonov
@qurbonovmurodbek
Gave up
— Solve time —
0 Submissions 6
— Language C++ (GCC 15)
— Run time —

Submission timeline (6)

All submissions
Wrong answer (test 9)
C++ (GCC 15) · 3 ms · 4 MB
Wrong answer (test 9)
C++ (GCC 15) · 4 ms · 4 MB
Wrong answer (test 2)
C++ (GCC 15) · 4 ms · 4 MB
C++ (GCC 15)
C++ (GCC 15)
C++ (GCC 15)

dilshodbek gulomov won

One of the players gave up — the winner gets a technical win.

d dilshodbek gulomov
Solution: Not solved
Rating: 1141 (+20)
M Murodbek Qurbonov
Solution: Not solved
Rating: 1190 (-20)
Start a new duel