diff options
Diffstat (limited to 'progs/unparsable_programs/a662.py')
-rw-r--r-- | progs/unparsable_programs/a662.py | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/progs/unparsable_programs/a662.py b/progs/unparsable_programs/a662.py new file mode 100644 index 0000000..0ab4afb --- /dev/null +++ b/progs/unparsable_programs/a662.py @@ -0,0 +1,6 @@ +from collections import defaultdict
+def max_aggregate(stdata):
+ temp = defaultdict(int)
+ for name, marks in stdata:
+ temp[name] += marks
+ return max(temp.items(), key=lambda x: x[1])
\ No newline at end of file |