Advertisement
Guest User

Untitled

a guest
Apr 27th, 2017
63
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Python 0.79 KB | None | 0 0
  1. import sys
  2.  
  3. points = {-4:6, -3:5, -2:4, -1:3, 0:2, 1:1, 2:0, 3:0, 4:0, 5:0, 6:0, 7:0}
  4.  
  5. def calculator(handicap, index):
  6.    score = handicap // 18 + (handicap % 18 >= index)
  7.    return score
  8.  
  9. def main():
  10.     par = {}
  11.     line1 = sys.stdin.readline()
  12.     line1 = line1.strip().split()
  13.  
  14.     for i in range(1, 19):
  15.         par[i] = line1[i-1]
  16.     #print(par)
  17.  
  18.     line2 = sys.stdin.readline()
  19.     line2 = line2.strip().split()
  20.     #print(line2)
  21.  
  22.     index = {}
  23.     for i in range(1, 19):
  24.         index[int(line2[i- 1])] = i
  25.     #print(index)
  26.  
  27.     scores = sys.stdin.readlines()
  28.     for line in scores:
  29.         handicap = line.strip().split()
  30.         print(handicap[-19])
  31.         total = int(handicap[-18:])
  32.         print(total)
  33.  
  34.  
  35.  
  36.  
  37.  
  38.  
  39.  
  40. if __name__ == '__main__':
  41.     main()
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement