subject

Read in an n*m matrix with binary value and output the number of number 1 in each column. Input format:
The first row contains two integers n, m
Then n rows, m integers per row of value 0 or 1

Output format:
m integers, one per line. Each number represents the count of 1 in the corresponding column.

Sample input:
3 5
0 0 1 1 0
0 1 1 0 1
1 0 0 1 0

Sample output:
1
1
2
2
1

Sample input:

5 8

1 1 1 0 0 1 0 1

0 0 1 1 1 0 1 1

1 0 0 1 1 0 1 0

0 0 0 0 1 1 1 1

0 0 1 1 1 1 1 0

HEL PLEASE

ansver
Answers: 3

Another question on Computers and Technology

question
Computers and Technology, 22.06.2019 21:00
Kirk found a local community college with a two-year program and he is comparing the cost with that of an out-of-state two-year school. what is the expected total cost for one year at the local community college if kirk lives at home? what is the expected total cost for one year at the out-of-state school if kirk lives on campus?
Answers: 2
question
Computers and Technology, 23.06.2019 00:10
My has been slow anyone else’s ?
Answers: 1
question
Computers and Technology, 24.06.2019 03:30
Explain the importance of html in web page designing in 20 sentences..
Answers: 1
question
Computers and Technology, 24.06.2019 11:20
Colby works as a shipping clerk for a major package delivery service. some of his daily tasks include tracking shipments and entering orders. which aspect of the information technology cluster would he most likely be trained in? a.networkingb.databasesc.hardwared.software
Answers: 2
You know the right answer?
Read in an n*m matrix with binary value and output the number of number 1 in each column. Input fo...
Questions
question
Health, 31.03.2020 18:18
question
History, 31.03.2020 18:18
question
Mathematics, 31.03.2020 18:18
question
Mathematics, 31.03.2020 18:18
Questions on the website: 13722363