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

Турниры > Lab6 - CEN/ECE/SWE > задача:


50341 - Separate Into Digits

Lab6 - CEN/ECE/SWE

Старт: 07.ноя.2023 в 00:20:01
Финиш: 14.ноя.2023 в 23:20:01
Турнир завершён!
• Турнирная таблица

Гость
• Вопросы к жюри (1)

Задачи турнира

• 50879 - Passed or Failed
• 50341 - Separate Into Digits
• 50798 - Passing the course
• 50797 - Nr of Missing Guests
• 50355 - Bills of City Water Company
• 50478 - Letter Grades
• 14-Fall1-20. 50480 - What quadrant ...
• 14-Fall1-60. 50482 - Bank Charges
• 2012-11-10. 50568 - Llogaritesi i in...
• 3. 50391 - Cinema Tickets

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

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

Лимит времени 2000/4000/4000/4000 мс. Лимит памяти 65000/65000/65000/65000 Кб.
bfs.

Separate Into Digits

Write a program that inputs one four-digit number, separates the number into its individual digits. Then, it prints digits separated by a space. And then, it prints the sum of digits in a new line.

Input specification
You will be given an integer number (num) where 1000 ≤ num ≤ 9999

Output specification
Show every digit in order in a line. Then show the sum of digits in the second line.

Sample Input I
  4367
Sample Input II
  5840
Sample Output I
  4 3 6 7
  20
Sample Output II
  5 8 4 0
  17


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

www.contester.ru