Problems for Beginners

Pie Are Squared
Given the radius of a circle, calculate and print its area. The area of a circle can be computed usi...
Missing Number
Given the sum of four numbers and three of those numbers, find the missing number. All four numbers ...
Maximum
Given N numbers, find the one that is of the highest value and print it.
Mixed Fractions
Given an improper fraction (as the numerator $N$ and the denominator $D$), determine and print it in...
Running Average
Given $N$ numbers, read each one, calculate the running average and print it. For example, given the...
Running Average Again
Given N numbers, read each one, calculate the running average and print it. For example, given the t...
Math and Watermelons
Your friend has M watermelons. He doesn't want to share them with anyone, but let's imagine he would...
Making Friends
Byang is going to join a new school. His new class has N students. Each of the students are identifi...
Leap Years
In the Gregorian calendar, certain years have 366 days instead of 365. In such years, the month of F...
Pascal's Triangle
Given an integer N, print the sum of the Nth row of the Pascal's triangle. In mathematics, Pascal's ...
Set Union
Given two sets of integers, print the set containing the union of the two input sets. For example, g...
Little Subarray Sum
Given an array of N numbers and two indices, determine the sum of the numbers in the array between (...
Proper Leap Years
Byang's friend was asked to author a programming problem where the challenge was to identify if the ...
Neat Brackets
Given a sequence of opening and closing parentheses ("(" and ")") you will have to determine if it i...
Little Matrix Multiplication
Given two 2×2 matrices, calculate the product of the two matrices. The product of two 2×2 matrices w...
Mines
The game of mines is a tricky one. You start with a grid and you click your way through the cells to...
N-th Prime
In this problem, you will have to print the n-th prime number. The first few prime numbers are given...
Matching Brackets
You will be given a sequence of opening and closing brackets of different types ((, ), [, ], {, and ...
Prime Factors
Given an integer N, can you determine its prime factors?
Special Triplets
You will be given an integer X. You have to print any three integers greater than 0 and lesser than ...
Print the Words
Given a blob of text you will have to determine the following statistics about it: The longest wor...
PotatoDB v1.0
You are building a new database software: PotatoDB. PotatoDB is meant to store numbers and handle th...
Painting a Red X
The ground floor of AUST has been renovated. It now looks like a square with N×N tiles. The tiles ar...
One-dimensional
Imagine there are several lines in an one dimensional space. You are given the starting and ending p...
Prime Plus Prime
You will be given an integer N. N is a prime number. You have to determine if adding any other prime...
Toph uses cookies. By continuing you agree to our Cookie Policy.