Try a demo
1. Choose Language
2. Choose problem
The aim of this test is to produce a simple calculator class.
The calculator is required to perform the four basic aritmetic operations:
The aim of this test is to implement the FizzBuzz problem.
FizzBuzz is defined for the "natural numbers" (numbers greater than zero) as:
- When divisible by 3, you should return "Fizz".
- When divisible by 5, you should return "Buzz".
- When divisible by both 3 and 5, you should return "FizzBuzz".
- When divisible by neither, you should return the number itself.
This is a lot more complicated than the fizzbuzz problem, and takes some real thinking to get right.
The aim of the test is to discover the shortest sequence of consecutive numbers, which when they are run through the fizzbuzz algorithm produce the required output.
For example, the shortest sequence that produces
When looking for the shortest sequence for
one sequence that produces that output is
3, 4, 5
However, this isn't the shortest. The shortest sequence is
In our case, we are only interested in the numbers between 1 and 100, so be sure you limit your calculations to that range, otherwise you are likely to exceed timeout limits.