Skip to content

Commit

Permalink
[코딩테스트책] 볼링공고르기 (#1)
Browse files Browse the repository at this point in the history
  • Loading branch information
heerucan committed Apr 3, 2022
1 parent bb8fb69 commit f402a5b
Showing 1 changed file with 12 additions and 0 deletions.
12 changes: 12 additions & 0 deletions CodingTest/CH3 그리디/볼링공고르기.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
import sys
from itertools import combinations

n, m = list(map(int, input().split()))
k = list(map(int, sys.stdin.readline().split()))

count = 0
for i in combinations(k, 2):
if i[0] != i[1]:
count += 1

print(count)

0 comments on commit f402a5b

Please sign in to comment.