Servicios Web Interview Questions

4,675 servicios web interview questions shared by candidates

Problem: You are given a number n. Find the decimal value of the number formed by the concatenation of the binaryrepresentation of the first n positive integers. Print the answer 10^9 + 7. Output format: Print the answer modulo 10^9 + 7 Constraint: 1 <= n <= 10^9 Sample input: 3 Sample Output: 27 The binary representation of 1: 1 The binary representation of 2: 10 The binary representation of 3: 11 Concatenated string: 11011 -> Decimal representation is 27.
avatar

Principal Web Engineer

Interviewed at BlueOptima

3.4
Sep 22, 2020

Problem: You are given a number n. Find the decimal value of the number formed by the concatenation of the binaryrepresentation of the first n positive integers. Print the answer 10^9 + 7. Output format: Print the answer modulo 10^9 + 7 Constraint: 1 <= n <= 10^9 Sample input: 3 Sample Output: 27 The binary representation of 1: 1 The binary representation of 2: 10 The binary representation of 3: 11 Concatenated string: 11011 -> Decimal representation is 27.

Viewing 4451 - 4460 interview questions

Glassdoor has 4,675 interview questions and reports from Servicios web interviews. Prepare for your interview. Get hired. Love your job.