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
Rotation of the array means that each element is shifted right by one index, and the last element of the array is moved to the first place.
A non-empty array A consisting of N integers is given.
A small frog wants to get to the other side of the road.
An array A consisting of N different integers is given.
A non-empty array A consisting of N integers is given.
A small frog wants to get to the other side of a river.
A non-empty array A consisting of N integers is given.
You are given N counters, initially set to 0, and you have two possible operations on them
This is a demo task. Write a function: def solution(A)
A non-empty array A consisting of N integers is given.
Write a function that, given three integers A, B and K, returns the number of integers within the range [A..B] that are divisible by K
A non-empty array A consisting of N integers is given.
An array A consisting of N integers is given.
Write a function that, given an array A consisting of N integers, returns the number of distinct values in array A.
A non-empty array A consisting of N integers is given. The prod
We draw N discs on a plane. The discs are numbered from 0 to N − 1.
A string S consisting of N characters is considered to be properly nested if any of the following conditions is true
You are given two non-empty arrays A and B consisting of N integers.
A string S consisting of N characters is called properly nested
You are going to build a stone wall.
An array A consisting of N integers is given.
A non-empty array A consisting of N integers is given.
A non-empty array A consisting of N integers is given.
An array A consisting of N integers is given.
A non-empty array A consisting of N integers is given.
A positive integer D is a factor of a positive integer N if there exists an integer M such that N = D * M.
An integer N is given, representing the area of some rectangle.
A non-empty array A consisting of N integers is given.
Two positive integers N and M are given. Integer N represents the number of chocolates arranged in a circle, numbered from 0 to N − 1.
A non-empty array A consisting of N numbers is given.
Located on a line are N segments, numbered from 0 to N − 1, whose positions are given in arrays A and B.
There are N ropes numbered from 0 to N − 1, whose lengths are given in an array A, lying on the floor in a line.
You would like to set a password for a bank account. However, there are three restrictions on the format of the password: