Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- from sys import stdin
- class Matrix(object):
- def __init__(self, x):
- self.mat = x
- def __str__(self):
- return '\n'.join([''.join(['%d\t' % i for i in r]) for r in self.mat])
- def size(self):
- r = len(self.mat)
- c = 0
- for r in self.mat:
- if len(r) > c:
- c = len(r)
- return r, c
- exec(stdin.read())
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement