report VI VI EN
Register | Login
  • HOME
  • PROBLEMSET
  • ROADMAP
  • COMPETITION
  • TOPIC
  • RANKING
  • GUIDE
  • MASHUP
  • ABOUT
  • CONTACT
  • Problem
  • Submit
  • Results
Sum - MarisaOJ: Marisa Online Judge

Sum

Time limit: 1000 ms
Memory limit: 256 MB
Given a string S consisting of letters, digits, and spaces, remove the letters and print the sum of the numbers within the string. The string may contain extra spaces. Write a program that takes as input a string and outputs the sum of the numbers in the string. ### Input - A single line containing the string $S$. ### Output - Print the sum of the numbers within the string $S$. It is guaranteed that the answer does not exceed $10^{18}$ ### Constraints - $1 \le |S| \le 1000$. ### Sample test ``` t1tt23 45 2e30 57 3qq3 ``` Output: ``` 488 ```
String
Length
Word Count
lowercase
Vowel
Digit sum
Strong password
Letter frequencies
Palindrome string
Palindrome substring
Caesar cipher
String occurences
Sum
String normalization
Run-length encoding
Expression
Topic
Basic
Rating 800
Solution (1) Solution