Balance (Easy version)
1732D11500· specialist3s256 MB⌨ stdin/stdout
Examples
Sample 1of 2
Input
15+ 1+ 2? 1+ 4? 2+ 6? 3+ 7+ 8? 1? 2+ 5? 1+ 1000000000000000000? 1000000000000000000
Output
36331032000000000000000000
Sample 2of 2
Input
6+ 100? 100+ 200? 100+ 50? 50
Output
200300150
58%
1732D1.cpp
loading editor…
Ln 11·137 BGNU C++20 (64)