Skip to content

Commit f0a1ecf

Browse files
committed
daily
1 parent ffe5a92 commit f0a1ecf

File tree

2 files changed

+6
-0
lines changed

2 files changed

+6
-0
lines changed

my-submissions/m3021.go

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
func flowerGame(n int, m int) int64 {
2+
return int64((n + 1) / 2) * int64(m / 2) + int64(n / 2) * int64((m + 1) / 2)
3+
}

my-submissions/m3021.py

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
class Solution:
2+
def flowerGame(self, n: int, m: int) -> int:
3+
return ceil(n / 2) * (m // 2) + (n // 2) * ceil(m / 2)

0 commit comments

Comments
 (0)