cf/mirror

Power Sequence

CF
1397B1500· specialist1s256 MB⌨ stdin/stdout

Examples

Sample 1of 2
Input
3
1 3 2
Output
1
Sample 2of 2
Input
3
1000000000 1000000000 1000000000
Output
1999982505
1397B.cpp
loading editor…
Ln 11·137 BGNU C++20 (64)