Maximum GCD Sum Queries
1973F3100· legendary gm5s512 MB⌨ stdin/stdout
Examples
Sample 1of 3
Input
3 41 2 34 5 61 1 10 1 2 3
Output
2 3 3 3
Sample 2of 3
Input
5 53 4 6 8 48 3 4 9 310 20 30 40 505 55 13 1000 113
Output
2 7 3 7 7
Sample 3of 3
Input
1 13450
Output
7
58%
1973F.cpp
loading editor…
Ln 11·137 BGNU C++20 (64)