deushiro

Untitled

Apr 1st, 2021
586
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Python 0.51 KB | None | 0 0
  1. dates = {}
  2. while(True):
  3.     s = input().split()
  4.     if(len(s) < 2):
  5.         break
  6.     date = s[0]
  7.     time = s[1]
  8.     price = int(s[2])
  9.     if(date not in dates):
  10.         dates[date] = []
  11.     dates[date].append(price)
  12. answer = 1
  13. for date in dates:
  14.     minmax = 1
  15.     for i in range(len(dates[date])):
  16.         for j in range(i + 1, len(dates[date])):
  17.             minmax = max(minmax, dates[date][j] / dates[date][i])
  18.     answer *= minmax
  19. answer -= 1
  20. answer *= 100
  21. print(answer)
  22.            
  23.    
  24.    
  25.  
Advertisement
Add Comment
Please, Sign In to add comment