Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- base1v1 = []
- base = []#it's base2v2
- #input_section
- for i in range(14): #14 is a count of members, I was able to use sys.stdin but thats simpler)
- splitted_input_string = input().split()
- nick = splitted_input_string[0].replace('_', ' ')
- pp = int(splitted_input_string[1])
- link = "https://osu.ppy.sh/u/" + nick
- if '1v1' in splitted_input_string[2]:
- base1v1.append([nick, pp, link])
- if '2v2' in splitted_input_string[2]:
- base.append([pp, nick, link])
- #input_section_end
- print('1v1 section:')
- sorted_base = sorted(base1v1, key = lambda l: l[1])#sorting by pp
- for i in sorted_base:
- print(i[0], i[1], i[2])
- print('2v2 section:')
- sorted_base = sorted(base, key = lambda x: x[0])#sorting by pp
- for i in range(len(sorted_base) // 2): #by each element in reversed first half
- print(f'{i+1}-st team is \n{sorted_base[i][1]}({sorted_base[i][2]}) + {sorted_base[-i - 1][1]}({sorted_base[-i - 1][2]}) [sum_of_pp = {sorted_base[i][0] + sorted_base[-i - 1][0]}]')
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement