title-img


Find Angle MBC Python

Input Format: The first line contains the length of side AB. The second line contains the length of side BC. Constraints: 1. 0<AB<=100 2. 0<BC<=100 3. length AB and BC are natural numbers Output Format: Output angle MBC in degrees.

View Solution →

Java BigDecimal

Java's BigDecimal class can handle arbitrary-precision signed decimal numbers. Let's test your knowledge of them! Given an array, s, of n real number strings, sort them in descending order — but wait, there's more! Each number must be printed in the exact same format as it was read from stdin, meaning that .1 is printed as .1, and 0.1 is printed as 0.1. If two numbers represent numerically equivalent values (e.g., .1=0.1), then they must be listed in the same order as they were received as in

View Solution →

Java Primality Test

A prime number is a natural number greater than 1 whose only positive divisors are 1 and itself. For example, the first six prime numbers are 2, 3, 5, 7, 11, and 13. Given a large integer, n, use the Java BigInteger class' isProbablePrime method to determine and print whether it's prime or not prime. Input Format A single line containing an integer, (the number to be checked). Constraints n contains at most 100 digits. Output Format If n is a prime number, print prime; oth

View Solution →

Java BigInteger

In this problem, you have to add and multiply huge numbers! These numbers are so big that you can't contain them in any ordinary data types like a long integer. Use the power of Java's BigInteger class and solve this problem. Input Format There will be two lines containing two numbers, a and b. Constraints a and bare non-negative integers and can have maximum 200 digits. Output Format Output two lines. The first line should contain a+b, and the second line should contain a*

View Solution →

Java 1D Array

An array is a simple data structure used to store a collection of data in a contiguous block of memory. Each element in the collection is accessed using an index, and the elements are easy to find because they're stored sequentially in memory. Because the collection of elements in an array is stored as a big block of data, we typically use arrays when we know exactly how many pieces of data we're going to have. For example, you might use an array to store a list of student ID numbers, or the na

View Solution →