Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR PYTHON

Maximum number of guests on cruise at an instance tcs

#Maximum number of guests on cruise at an instance tcs

N = int(input())
tg = 0
Total= []
for i in range(N):
  en = int(input())
  le = int(input())
  dif = en-le
  tg = tg + dif
  Total.append(tg)
print(max(Total))
 
PREVIOUS NEXT
Tagged: #Maximum #number #guests #cruise #instance #tcs
ADD COMMENT
Topic
Name
6+6 =