Month: September 2017

Area of a Circle

                              Area of a Circle   The program must accept the diameter of the circle as a command line argument and print the area of the circle rounding it up to 2 decimal places. Example Input/Output 1: Input: 14 Output: 154.00

Bob’s Game

                    Bob's Game   Challange link:     Bob recently invented a new game. The game is played on an chessboard. The rules of the game are: Initially, there are kings in some of the cells. A cell can contain more

Black White Tree

               Black White Tree Click here to Solve the problem!! Daisy has a tree with  node and  edges. Each node of the tree is colored either black or white. She defines the strangeness of a tree as the absolute difference between the number of black nodes and white nodes. The tree in the

March of the King

             March of the King                                                             Click Here to solve the problem The white king George lives all alone in a chessboard (A standard

The Snake vs the Wind

          The Snake vs the Wind A group of scientists is doing some experiments with a snake. They want to measure its intelligence by observing the way it moves inside a specific area. The scientists have inserted the snake inside a two-dimensional square. They have filled the area with  mice (one in each

A Small Step Toward Calculators

  A Small Step Toward Calculators Alice has a string of the form x+y or x-y. Here,  and  are single-digit nonnegative integers. Her task is to perform the addition or subtraction accordingly and print the result. As a newbie programmer, Alice is struggling to finish the task. Can you help her? Input Format In a single line, you will be

Erupting Volcanoes

              Erupting Volcanoes According to recent research, most active volcanoes are located near the islands of the Pacific Ocean. Scientists know the effects of the volcanic lava and they want to measure the maximum effect of lava on a specific area. It is difficult for them to analyze the

Perfect Squares – Till N

                    Perfect Square till N Java, Cpp   Given a positive integer N as the input, print all the perfect squares till N (inclusive of N). Input Format: The first line contains N. Output Format: The first line contains the perfect squares till N separated by

Pattern Printing – Start Number

                 Pattern Printing - Start Number   Given an integer N as the input and a start integer S, print the pattern as given in the Example Input/Output section. Input Format: The first line contains S and N, each separated by a space. Output Format: 2N lines containing

String – Repeating Alphabets

                    String - Repeating Alphabets   Given a string S as the input, print the distinct alphabets in S that occur more than once. The alphabets must be printed based on the order of their occurrence in S. Input Format: The first line contains S. Output