Advertisement
Guest User

Untitled

a guest
Mar 29th, 2017
59
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.25 KB | None | 0 0
  1. # 595A : VITALY AND NIGHT
  2. # Prerequisite : Implementation
  3.  
  4. n,m=map(int,raw_input().split())
  5. counter=0
  6. for j in range(n):
  7. floor=map(int,raw_input().split())
  8. for i in range(0,2*m,2):
  9. if floor[i] or floor[i+1]:
  10. counter+=1
  11. print counter
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement