## ZOOZ | Zero Ones Equal One Zeros | Codechef problem Java Solution

Problem Statement: Kulyash believes in equality.Given an integer N, output a binary string of length N such that: The count of 01 subsequences in the string is equal to the count of 10 subsequences;The string has at least one occurrence of 0 as well as 1.If multiple such strings exist, Read more…

## The Grand Dinner Competitive Programming question

The Grand Dinner Competitive Programming question online judge Problem Statement: Each team participating in this year’s ACM World Finals contest is expected to join the grand dinner to be arranged after the prize giving ceremony ends. In order to maximize the interaction among the members of different teams, it is Read more…

## Light More Light Competitive Programming question

Problem Statement : There is man named ”mabu” for switching on-off light in our University. He switches on-off the lights in a corridor. Every bulb has its own toggle switch. That is, if it is pressed then the bulb turns on. Another press will turn it off. To save power Read more…

## Bicoloring competitive programming question

Bicoloring Online judge (10004) problem with solution in python In 1976 the “FourColorMapTheorem” was proven with the assistance of a computer. This theorem states that every map can be colored using only four colors, in such a way that no region is colored using the same color as a neighbor Read more…

## Tug Of War Competitive Programming question

Tug Of War Problem Statement : Given a set of n integers, divide the set in two subsets of n/2 sizes each such that the difference of the sum of two subsets is as minimum as possible. If n is even, then sizes of two subsets must be strictly n/2 Read more…

## Smith Number competitive programming question

Smith Number Description : A number is said to be a smith number if sum of digits of the number is equal to the sum of the digits of its prime factors (excluding 1). We have to find factors using prime factorization method For example if we consider number = Read more…

## Print fraction and integer part of a float number separately

Question: Write a Program to take fraction Number as input from console and connect the given fraction to a floating point number and then extract the integer part and the fractional part of that floating point number.  Example input: 22.34 Example Output: Interger 22, Float 34  Source Code N = Read more…

## Print nth term in Fibonacci series for the inputted number

Question: Write a program to take two integer inputs from console. Number and N and print nth term in fibonacci series for the inputted Number.  Fibonacci series :0,1,1,2,3,5,8,13,21,34,55,89,144 and so on. Example input : 5  3 Example output: 21  source code n1 = int(input()) n2 = int(input()) n_terms=n1+n2 n_1 = 0 Read more…

## Prime Sum competitive programming

Question : Consider a  integers innum . Find and print a number outnum based on the below logic: Using prime number range from 1 to n (both inclusive)  Find those Four number have sum is equal to given innum  . if there is combination whose sum is equal to sum of innum  print number Read more…

## Harshad Matrix | Springboard coding question solution

Harshad Matrix Infosys springboard coding question with solution Problem Statement : Given a m x n matrix inmatrix of positive integers, write a program to print outmatrix based on the below logic: • Identify all 2×2 sub-matrix/matrices in inmatrix where each element is a Harshad number A number is a Harshad number if it Read more…