1018. Binary Prefix Divisible By 5
Description
**Input:** nums = [0,1,1]
**Output:** [true,false,false]
**Explanation:** The input numbers in binary are 0, 01, 011; which are 0, 1, and 3 in base-10.
Only the first number is divisible by 5, so answer[0] is true.**Input:** nums = [1,1,1]
**Output:** [false,false,false]**Input:** nums = [0,1,1,1,1,1]
**Output:** [true,false,false,false,true,false]ac
Last updated