-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathtemplatepy.py
More file actions
33 lines (27 loc) · 720 Bytes
/
templatepy.py
File metadata and controls
33 lines (27 loc) · 720 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
import sys
class SamInput(object):
def __init__(self):
self.inp = []
for i in sys.stdin:
i = i.replace("\n", "")
j = list(i.split())
self.inp.append(j)
def readln(self):
if len(self.inp) == 0:
return False
else:
return str.join(" ", self.inp.pop(0))
def read(self):
if len(self.inp) == 0:
return False
while len(self.inp[0]) == 0:
self.inp.pop(0)
if len(self.inp) == 0:
return False
return self.inp[0].pop(0)
def readint(self):
return int(self.read())
def main():
inp = SamInput()
if __name__ == '__main__':
main()