CodeLab Academy 📞 9936 6696
← List Python · Level 8: Nested loops Code · 80 points ← #732 #734 →

#733. Matrix: Sum of each row

You are given a matrix of integers. **Sum of each row**. ### Input The first line has n m (the number of rows and columns), each of the next n lines has m integers. ### Output The answer.

Examples

Input
4 3
4 4 8
-1 -3 5
6 -2 1
5 6 1
Output
16
1
5
12
Input
4 3
2 -5 -4
0 -1 1
0 -3 4
1 -6 6
Output
-7
0
1
1

💡 You can solve it with Python, JavaScript or blocks. Read the input line by line with input(). Don't print a question (like input("Number: ")). Print exactly what the output asks for, nothing more.

🔒 You can solve the first 3 problems without an account. Sign up for free to solve this one!