The TransCompilator

Solved LeetCode program · 782 of 1,000

#1018 · Binary Prefix Divisible By 5

Easy Array chunk-16.md

Original English source

The bits is a list of 0, 1, and 1. The answers is an empty list of text. The remainder is 0.
For every spot from 0 to the last position of bits.
Set remainder to (remainder times 2 plus item spot of bits) modulo 5. If remainder is 0, Place "true" into answers, otherwise Place "false" into answers.

The line is join answers with ",". Show line.

Open in Playground Browse all 1,000 problems

Expected stdout

true,false,false