repl.it
@rshetty/

ccc boi

Python

No description

fork
loading
Files
  • main.py
main.py
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
numPlanks = int(input())

planks = [int(x) for x in input().split()]
boards = []
for i in planks:
	temp = planks.copy()
	temp.remove(i)
	for j in temp:
		boards.append(i + j)

og = list(dict.fromkeys(boards))

counts = []

for g in og:
	counts.append(boards.count(g))
heights = 0
for g in og:
	if boards.count(g) == max(counts):
		heights += 1
print(max(counts), heights)