mirror of
https://github.com/tiennm99/CSX101.git
synced 2026-06-06 04:11:28 +00:00
5 lines
123 B
Python
5 lines
123 B
Python
n, m = [int(i) for i in input().split()]
|
|
op = 0
|
|
if (n > 1 and m > 1):
|
|
op = int((n - 1)*n/2 + (m - 2)*(m-1)/2)
|
|
print(op) |