Skip to content

Commit 04a80ba

Browse files
committed
update
1 parent 5cbe6de commit 04a80ba

File tree

1 file changed

+20
-0
lines changed

1 file changed

+20
-0
lines changed

week15/heanim/생태학.py

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
2+
tree_dict = dict()
3+
total = 0
4+
5+
while 1:
6+
tree = input().rstrip()
7+
if not tree:
8+
break
9+
10+
total += 1
11+
12+
if tree not in tree_dict.keys():
13+
tree_dict[tree] = 1
14+
else :
15+
tree_dict[tree] += 1
16+
17+
lst = sorted(list(tree_dict.keys()))
18+
19+
for tree in lst:
20+
print(tree," ",round(tree_dict[tree]/total *100,4))

0 commit comments

Comments
 (0)