cf/mirror

Sum of Progression

CF
1921F1900· candidate master2s1024 MB⌨ stdin/stdout

Examples

Sample 1of 1multi-test • hover to link
Input
5
3 3
1 1 2
1 2 2
2 2 1
1 1 2
3 1
-100000000 -100000000 -100000000
1 1 3
5 3
1 2 3 4 5
1 2 3
2 3 2
1 1 5
3 1
100000000 100000000 100000000
1 1 3
7 7
34 87 5 42 -44 66 -32
2 2 2
4 3 1
1 3 2
6 2 1
5 2 2
2 5 2
6 1 2
Output
5 1 3
-600000000
22 12 55
600000000
171 42 118 66 -108 23 2
1921F.cpp
loading editor…
Ln 11·137 BGNU C++20 (64)