cf/mirror

Search for Pretty Integers

CF
870A900· newbie1s256 MB⌨ stdin/stdout

Examples

Sample 1of 2
Input
2 3
4 2
5 7 6
Output
25
Sample 2of 2
Input
8 8
1 2 3 4 5 6 7 8
8 7 6 5 4 3 2 1
Output
1
870A.cpp
loading editor…
Ln 11·137 BGNU C++20 (64)