FizzBuzz
InterviewTime limit0.5sMemory limit1024 MB
Given three consecutive FizzBuzz outputs, print the string that comes right after them.
- Level
Easy3 of 10
- Topics
- Implementation, Math
- Solved
- No attempts yet
Problem
The FizzBuzz problem asks you to print one string per line for according to these rules.
- If is a multiple of and of , print "
FizzBuzz". - If is a multiple of but not of , print "
Fizz". - If is not a multiple of but is a multiple of , print "
Buzz". - If is neither a multiple of nor of , print as is.
Three consecutive output strings from the FizzBuzz problem are given. What string comes right after these three?
Input
Three consecutive output strings from the FizzBuzz problem are given, one per line. Each string has length or less. The input is always guaranteed to correspond to three consecutive output strings of the FizzBuzz problem.
Output
Print the string that comes right after the three consecutive strings. If more than one string could come next, print any one of them.
Hint
The output for in the FizzBuzz problem is as follows.
1
2
Fizz
4
Buzz
Fizz
7
8
Fizz
Buzz
11
Fizz
13
14
FizzBuzz
16
17
Fizz
19
Buzz