The code stubs in your editor declare a Solution class and a main method.
Complete the main method by copying the two lines of code below and pasting them inside the body of your main method.
In this challenge, you must read integers from stdin and then print them to stdout.
Each integer must be printed on a new line. To make the problem a little easier,
a portion of the code is provided for you in the editor below
In this challenge, you must read an integer, a double, and a String from stdin,
then print the values according to the instructions in the Output Format section below.
To make the problem a little easier, a portion of the code is provided for you in the editor.
Given an integer, , perform the following conditional actions:
If is odd, print Weird
If is even and in the inclusive range of to , print Not Weird
If is even and in the inclusive range of to , print Weird
If is even and greater than , print Not Weird
Complete the stub code provided in your editor to print whether or not is weird.
Given an integer, , print its first multiples. Each multiple (where )
should be printed on a new line in the form: N x i = result
You are given queries in the form of , , and . For each query, print the series corresponding
to the given , , and values as a single line of space-separated integers.
The challenge here is to read lines of input until you reach EOF, then number and print all lines of content.
You are given a class Solution with a main method. Complete the given code so that it outputs
the area of a parallelogram with breadth and height . You should read the variables from the standard input.
If or , the output should be "java.lang.Exception: Breadth and height must be positive" without quotes.
You are given an integer , you have to convert it into a string.
Please complete the partially completed code in the editor. If your code successfully converts
into a string the code will print "Good job". Otherwise it will print "Wrong answer".
The elements of a String are called characters. The number of characters in a String is
called the length, and it can be retrieved with the String.length() method.
Given a string, s, and two indices, eand , print a substring consisting of all characters
in the inclusive range from to . You'll find the String class' substring method helpful in completing this challenge.
Given a string , print Yes if it is a palindrome, print No otherwise.
Given a double-precision number, , denoting an amount of money, use the NumberFormat class'
getCurrencyInstance method to convert into the US, Indian, Chinese, and French currency formats.
Given a string, determine if it is balanced or not.
Reads an integer from stdin and saves it to a variable, , denoting some number of integers.
Attempts to print each element of an array of integers named .