Binary Prefix Divisible By 5

Given a binary array nums, treat each prefix nums[0..i] as a binary number. Return a boolean array where the i-th entry is true if the prefix value is divisible by 5.

Examples
Input: [0]
Output: [true]
Hints

Binary Prefix Divisible By 5

Given a binary array nums, treat each prefix nums[0..i] as a binary number. Return a boolean array where the i-th entry is true if the prefix value is divisible by 5.