ГлавнаяСборникиТурнирыРазделыФорумыУчастникиПечатьПомощьО системе

Сборники > Фёдор Меньшиков. Тренировки > задача:


50882 - FizzBuzz

Гость
• Обсуждение задачи (1)

Задачи сборника

• 148. 50596 - Udhetimi juaj eshte ketu
• 150. 50763 - Valid Password
• 151. 50560 - Distanca maksimale
• 153. 50368 - Right-most non zero d...
• 155. 50379 - a^b modulus k
• 158. 50404 - Sum of Self Powers
• 30. 50764 - Fast Typing Competition
• 50303 - Pattern
• 50882 - FizzBuzz
• 50308 - IT Knowledge Seminars
• 50320 - Random Sorted List
• 001. 50385 - From m to n
• 002. 50365 - Sum of the numbers f...
• 002. 50452 - Multiplication Table
• 003. 50387 - Passengers in the Train
• 006. 50293 - Sum of odd numbers f...
• 007. 50401 - Sum of Odd Numbers

Обратная связь

Если у вас есть предложения или пожелания по работе Contester, посетите форум сайта www.contester.ru.

Лимит времени 2000/4000/4000/4000 мс. Лимит памяти 65000/65000/65000/65000 Кб.
Prepared by Halil Karimis. Сложность Альфа

Fizz Buzz

Johnny wanted to show the numbers from 1-N (0< N <1000). But, his computer is broken and started to show ”Fizz” for every multiple of "3" and “Buzz” for every multiple of “5”.

If a number is both a multiple of 3 and 5 it outputs “Fizz Buzz”.

Otherwise it prints the numbers with a space in between them.

Because this error is really fascinating. You are asked to write a program that simulates this error.

Input specification
An integer number N

Output specification
A series of numbers from 1-N and the words “Fizz” , “Buzz” used accordingly.

Sample Input I
5
Sample Input II
16
Sample Output I
1 2 Fizz 4 Buzz
Sample Output II
1 2 Fizz 4 Buzz Fizz 7 8 Fizz Buzz 11 Fizz 13 14 Fizz Buzz 16


Для отправки решений необходимо выполнить вход.

www.contester.ru