✅ One Line Solution
(Disclaimer: this is not an example to follow in a real project - it is written for fun and training mostly)Code #1.1 - One LineTime complexity: O(n). Space com
(Disclaimer: this is not an example to follow in a real project - it is written for fun and training mostly)

# Code #1.1 - One Line
Time complexity: $$O(n)$$. Space complexity: $$O(n)$$.
```
class Solution:
    def numberOfSubarrays(self, a: List[int], k: int) -> int:
        return (z:=Counter([q:=0])) and sum(z.update([q:=q+v%2]) or z[q-k] for v in a)
```

# Code #1.2 - Unwrapped
```
class Solution:
    def numberOfSubarrays(self, a: List[int], k: int) -> int:
        res, z, q = 0, Counter([0]), 0
        for v in a:
            q += v%2
            z[q] += 1
            result += z[q-k]

        return res
```

(Disclaimer 2: code above is just a product of fantasy packed into one line, it is not claimed to be 'true' oneliners - please, remind about drawbacks only if you know how to make it better)
['Array', 'Hash Table', 'Math', 'Prefix Sum', 'Python', 'Python3']