Problems > Even-Product Pairs > Editorial

Even-Product Pairs — Solution & Editorial

Back to the Problem

Complement: only odd×odd stays odd, so answer = C(N,2) − C(odds,2).

Complexity: O(N)