f = lambda x:sorted(x,lambda(S,N,D),(s,n,d):N*d-n*D)[0][0] print f([["fencing",15,85],["billiards",60,102],["basketball",15,119]])
Standard input is empty
basketball
The brand new service which powers Ideone!
Widget for compiling and running the source code in a web browser!