Here I will use python 3.x.
Input-Output:
#Take input while End Of File:
while True:
try:
n=input()
except EOFError:
break;
#Take space separated int inputs:
while True:
try:
inp=input()
except EOFError:
break;
n,m=inp.split()
n=int(n)
m=int(m)
#Take input while a certain conditions are met.
while True:
inp=input()
except EOFError:
break;
n,m=inp.split()
n=int(n)
m=int(m)
#Take input while a certain conditions are met.
while True:
inp=input()
n,m=inp.split()
n=int(n)
m=int(m)
if n==0 and m==0:
break
Array related:
Two dimensional Array initialized with zero:
n,m=inp.split()
n=int(n)
m=int(m)
if n==0 and m==0:
break
Array related:
Two dimensional Array initialized with zero:
array=[[0 for x in range(102)] for y in range(102)]
No comments:
Post a Comment