A binary gap within a positive integer N is any maximal sequence of consecutive zeros that is surrounded by ones at both ends in the binary representa
A non-empty array A consisting of N integers is given. The consecutive elements of array A represent consecutive cars on a road.Array A contains only
Write a function:function solution(A, B, K);that, given three integers A, B and K, returns the number of integers within the range A..B that are divis
Write a functionfunction solution(A);that, given an array A consisting of N integers, returns the number of distinct values in array A.For example, gi
A non-empty array A consisting of N integers is given. The product of triplet (P, Q, R) equates to AP AQ AR (0 ≤ P < Q < R < N).For example
We draw N discs on a plane. The discs are numbered from 0 to N − 1. An array A of N non-negative integers, specifying the radiuses of the discs, is gi
An array A consisting of N integers is given. A triplet (P, Q, R) is triangular if 0 ≤ P < Q < R < N and:AP + AQ > AR,AQ + AR > AP,AR + AP >