Write a program that prints the number of sequences made up of exactly zeros and ones that are multiple of three when considered as a binary number. Note that numbers that begin with one or more zeros are allowed here.
For instance, there are 9 sequences for and :
Input consists of several pairs of natural numbers and , each between 0 and 30.
For every pair of and , print the required number.
Author: Salvador Roura
Generation: 2026-01-25T11:33:55.763Z
© Jutge.org, 2006–2026.
https://jutge.org