Advertisement
Guest User

Untitled

a guest
Mar 31st, 2020
96
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.39 KB | None | 0 0
  1. from sys import stdin
  2.  
  3.  
  4. class Matrix(object):
  5.  
  6. def __init__(self, x):
  7. self.mat = x
  8.  
  9. def __str__(self):
  10. return '\n'.join([''.join(['%d\t' % i for i in r]) for r in self.mat])
  11.  
  12. def size(self):
  13. r = len(self.mat)
  14. c = 0
  15. for r in self.mat:
  16. if len(r) > c:
  17. c = len(r)
  18. return r, c
  19.  
  20.  
  21. exec(stdin.read())
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement