Medium

Alice and Bob Playing Flower GameC++

Full explanation · Time O(1) · Space O(1)

// Time:  O(1)
// Space: O(1)

// combinatorics
class Solution {
public:
    long long flowerGame(int n, int m) {
        return (1ll * n * m) / 2;
    }
};