Notice
Recent Posts
Recent Comments
Link
일 | 월 | 화 | 수 | 목 | 금 | 토 |
---|---|---|---|---|---|---|
1 | ||||||
2 | 3 | 4 | 5 | 6 | 7 | 8 |
9 | 10 | 11 | 12 | 13 | 14 | 15 |
16 | 17 | 18 | 19 | 20 | 21 | 22 |
23 | 24 | 25 | 26 | 27 | 28 |
Tags
- 따라하면서 배우는 C언어
- C언어
- Python
- udemy
- String
- Algospot
- BOJ
- php
- JavaScript
- web
- programmers
- 따배씨
- graph
- sorting
- 생활코딩
- Algorithm
- server
- Cleancode
- BASIC
- 따라하며 배우는 C언어
- greedy
- Math
- C
- BFS
- 종만북
- dfs
- DP
- 백준
- 인프런
- 정수론
Archives
- Today
- Total
몽상실현개발주의
[BOJ] 6603 / 로또 / Python 파이썬 본문
[BOJ] 6603 / 로또 / Python 파이썬
https://www.acmicpc.net/problem/6603
풀이
조합으로 경우의 수를 구하여 해결하였다.
import sys
from itertools import combinations
input = sys.stdin.readline
while True:
nums = list(map(int, input().split()))
if nums[0] == 0:
break
for comb in combinations(range(1, nums[0]+1), 6):
for c in comb:
print(nums[c], end=" ")
print()
print()
'Algorithm PS > BOJ' 카테고리의 다른 글
[BOJ] 2003 / 수들의 합 2 / Python 파이썬 (0) | 2021.08.09 |
---|---|
[BOJ] 1182 / 부분수열의 합 / Python 파이썬 (0) | 2021.08.09 |
[BOJ] 1987 / 알파벳 / Python 파이썬 (0) | 2021.08.09 |
[BOJ] 2580 / 스도쿠 / Python 파이썬 (0) | 2021.08.05 |
[BOJ] 1759 / 암호 만들기 / Python 파이썬 (0) | 2021.08.04 |
Comments