반응형 조합2 baekjoon - python - 1010 www.acmicpc.net/problem/1010 1010번: 다리 놓기 입력의 첫 줄에는 테스트 케이스의 개수 T가 주어진다. 그 다음 줄부터 각각의 테스트케이스에 대해 강의 서쪽과 동쪽에 있는 사이트의 개수 정수 N, M (0 < N ≤ M < 30)이 주어진다. www.acmicpc.net # @Author YoungMinKim # baekjoon import sys import math def combinations_len(p,r): return math.factorial(p)/(math.factorial(r)*math.factorial(p-r)) for _ in range(int(sys.stdin.readline())): N,M = map(int,sys.stdin.readline().split.. 2020. 12. 20. baekjoon - python - 6768 www.acmicpc.net/problem/6768 6768번: Don’t pass me the ball! A CCC soccer game operates under slightly different soccer rules. A goal is only counted if the 4 players, in order, who touched the ball prior to the goal have jersey numbers that are in strictly increasing numeric order with the highest number being the www.acmicpc.net 이 문제는 경우의 수 문제이다. 오랜만에 수학을 풀려니 힘들어서 적어본다.. 숫자카드 조합 문제를 중고등학교 때 많이 .. 2020. 12. 19. 이전 1 다음 반응형