From 86768f62b18b1165fc943975e9419e4f4fdd3e0c Mon Sep 17 00:00:00 2001 From: chayan das Date: Fri, 29 Aug 2025 14:18:43 +0530 Subject: [PATCH] Create 3021. Alice and Bob Playing Flower Game --- 3021. Alice and Bob Playing Flower Game | 12 ++++++++++++ 1 file changed, 12 insertions(+) create mode 100644 3021. Alice and Bob Playing Flower Game 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; + } +};