n, m = raw_input().split()for i in xrange(int(n)): tokens = raw_input().split() print '%s %.2f' % (tokens[0], sum(int(scr) for scr in tokens[1:])/float(m))
3 5 JON 19 14 15 15 16 JEREMY 15 11 10 15 16 JESSE 19 17 20 19 18
JON 15.80 JEREMY 13.40 JESSE 18.60
The brand new service which powers Ideone!
Widget for compiling and running the source code in a web browser!