cf/mirror

April Fools' Problem (easy)

CF
802M11200· pupil2s256 MB⌨ stdin/stdout

Examples

Sample 1of 5
Input
8 5
1 1 1 1 1 1 1 1
Output
5
Sample 2of 5
Input
10 3
16 8 2 4 512 256 32 128 64 1
Output
7
Sample 3of 5
Input
5 1
20 10 50 30 46
Output
10
Sample 4of 5
Input
6 6
6 6 6 6 6 6
Output
36
Sample 5of 5
Input
1 1
100
Output
100
802M1.cpp
loading editor…
Ln 11·137 BGNU C++20 (64)