diff --git a/3021. Alice and Bob Playing Flower Game b/3021. Alice and Bob Playing Flower Game new file mode 100644 index 0000000..fe724ba --- /dev/null +++ b/3021. Alice and Bob Playing Flower Game @@ -0,0 +1,12 @@ +class Solution { +public: + long long flowerGame(int n, int m) { + long long ne=n/2; + long long me=m/2; + long long no=n-ne; + long long mo=m-me; + + long long ans=mo*ne+no*me; + return ans; + } +};