Problems
easySum of Digits
2 Koda Coins

Sum of Digits

easy2s limit💾 64 MB

Description

Given an integer N, calculate and print the sum of its digits. If N is negative, treat it as positive for the purpose of summing digits.


Input Format

  • A single integer N.

  • Output Format

  • Print the sum of the digits.

  • Constraints

  • -10^9 <= N <= 10^9