Rosetta Problems

Sum of product of pairs

https://atcoder.jp/contests/abc177/tasks/abc177_c