Colored Balls
1954D1800· expert2s1024 MB⌨ stdin/stdout
Examples
Sample 1of 3
Input
31 1 2
Output
11
Sample 2of 3
Input
15
Output
5
Sample 3of 3
Input
41 3 3 7
Output
76
58%
1954D.cpp
loading editor…
Ln 11·137 BGNU C++20 (64)
31 1 2
11
15
5
41 3 3 7
76