fork(3) download
  1. a, b, c = map(int, input().split(' '))
  2. points = {}
  3. points['abc'] = 3000 - 12 * a - 10 * b - 6 * c
  4. points['cba'] = 3000 - 2 * a - 6 * b - 12 * c
  5. points['acb'] = 3000 - 12 * a - 4 * b - 10 * c
  6. points['cab'] = 3000 - 6 * a - 4 * b - 12 * c
  7.  
  8. maxpts = max(points.values())
  9. for i in ['abc', 'cba', 'acb', 'cab']:
  10. if points[i] == maxpts:
  11. print(i)
  12.  
Success #stdin #stdout 0.03s 9440KB
stdin
5 10 20
stdout
abc