subject
English, 14.12.2021 04:10 smuqtadir124

Python 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

ansver
Answers: 1

Another question on English

question
English, 21.06.2019 17:00
Part a: what are two main ideas of maria w. stewart’s speech? a god is responsible for the discriminatory treatment of african americans. b any individual who decides to commit to a life of domestic servitude is disgraceful. c african americans and women are products of the unfair treatment they receive in the united states. d slavery has crushed african americans’ will to resist and overcome discriminatory practices. e african american women can merely pray for divine intervention for equal rights, as they are not a priority for social reformers. f african americans should work to advance their status by demanding more opportunities for education and meaningful work.
Answers: 1
question
English, 21.06.2019 17:50
Which words most the reader understand the meaning of usurpers
Answers: 3
question
English, 22.06.2019 02:00
Correct the sentence below: the pizza delivery boy was neither early nor late he was right on time. a: correct as it is b: the pizza delivery boy was neither early nor late, he was right on time. c: the pizza delivery boy was neither early nor late; and he was right on time. d: the pizza delivery boy was neither early nor late: he was right on time.
Answers: 2
question
English, 22.06.2019 03:20
Which of these names would be listed first in a telephone directory? a: d’agostino b: dague c: dagy
Answers: 1
You know the right answer?
Python Read in an n*m matrix with binary value and output the number of number 1 in each column.
Questions
question
Chemistry, 14.07.2019 14:00
Questions on the website: 13722360