Valuable digit

Valuable digit

Time Limit: 2.0 s

Memory Limit: 256.0 MB

Description

After a month of mining for a valuable metal named "digit" , Alice found a stone containing some digits.
There are 10 types of digits which are '0' , '1' , '2' ..... '8' , '9'.

price of a type of digit is the same as the integer version of it. such as price of '0' is 0 , '1' is 1 and so on.

What Alice found is a stone mixed with some digit and some other unnecessary minerals.

Alice wants to know the total value of his found stone. Can you help him ?

Input

First line takes an integer \(T\) : Number of testcases
each of next \(T\) lines takes a string \(S\) which describes the stone which alice found
\(1 <= T <= 10\)
\(1 <= |S| <= 100\)

Output

print \(T\) integer in each of \(T\) line : The value of the found string of alice.

Sample

Input Output
3
a3t82ac4
h3110wor1d
31um1n4t150flu
17
6
15

in the first testcase : "a3t82ac4"
the total value of the stone is 3+8+2+4 = 17

Information

ID
1072
Difficulty
1
Category
(None)
Tags
(None)
# Submissions
91
Accepted
65
Accepted Ratio
71%
Uploaded By

Related

In following contests:

Brain Booster #4