#Lutece1914. 数据大搜索

数据大搜索

Migrated from Lutece 1914 数据大搜索

All parts of this problem, including description, images, samples, data and checker, might be broken. If you find bugs in this problem, please contact the admins.

Description

一行字符串可能含有多个正整数, 请找出这些整数, 并输出它们的和.

Input

有多组测试数据. 输入的第一行是整数T(1<=T<=100), 表示随后测试数据的组数. 每组测试数据占一行, 由一个可能含有空格的字符串构成, 该字符串可能含有多个数字子串, 每个数字子串的数字个数不超过16, 数字子串的个数不超过10, 字符串的长度不超过1000.

Output

对应每组测试数据, 输出该字符串所包含整数的和. 如果该字符串没有包含数字, 请输出0.

Samples

4
.13464dfhf212dfh 03de3ger3323
&^*(887(&**(LIKJLKjljLHK3525**000j
lsdjflg;k*(&*&^&*&lkjsds)()(*()
123365874&&123
17005
4412
0
123365997

Resources

wxiaoping - 2018.05.01