Sum of Digits

1.3

3 votes
Problem

Find the sum of all the digits present in a string. eg- "a2d3ef4s" in this, sum=9 .

Input/output format: There is only one test case. In the first line take input the string and then display the sum of all the digits in next line

Sample Input:

a2d3ef4s

Sample Output:

9

Explaination: 2+3+4=9

Time Limit: 5
Memory Limit: 256
Source Limit:
Editor Image

?