АВТ
Language:

Remote Training on Programming

Problems On-line status Contests FAQ
For authors:
Register  ||  Login
 
Hello, Guest! Login or register.

131. Сумма цифр

Time Limit: 1 seconds
Memory Limit:64000KB
Points:2
View Problem Statistics Submit Problem added Administrator

Сумма цифр.

Дано натуральное число n < 1000000. Чему равна сумма его цифр?

Примечание для студентов, изучающих курс "Архитектура ВС": задача решается на ассемблере.

Входные данные

   Число n < 1000000 

Выходные данные

  Сумма цифр числа n

Пример входных данных

123456
  

Пример выходных данных

21
  
Автор: Вабищевич А. Ю.

View Problem Statistics Submit Author/source:
Educational Courses / Programming and Basics of Algorithmization / Cycles /
128. Римские цифры 131. 132. Треугольник Паскаля 129. Числа Фибоначчи
Educational Courses / Structured Computer Organization /
679. Hamming Decoding 131.
We can all benefit by doing occasional "toy" programs, when artificial restrictions are set up, so that we are forced to push our abilities to the limit. The art of tackling miniproblems with all our energy will sharpen our talents for the real problems. Donald E. Knuth.
time generating 0.016 sec.
© Copyright VSTU, AVT, Nosov D.A.