Tổng các chữ số

View as PDF

Points: 100 Time limit: 1.0s Memory limit: 256M Input: stdin Output: stdout

Cho số nguyên dương \(s\). Hãy in ra tổng các chữ số của \(s\).

Input

  • Dòng thứ nhất chứa số \(t(1\le t\le 100)\) - Thể hiện số lượng testcase

  • \(t\) dòng tiếp theo, mỗi dòng chứa số nguyên dương \(s(1\le s\le 10^{50000})\)

Output

  • Ứng với mỗi testcase, in ra đáp án cần tìm.

Example

Test 1

Input
2
21
12
Output
3
3

Comments

There are no comments at the moment.