본문 바로가기

Python3

1966 숫자를 정렬하자 SWEA D2 Python 1966: 숫자를 정렬하자 파이썬 SW Expert Academy SW 프로그래밍 역량 강화에 도움이 되는 다양한 학습 컨텐츠를 확인하세요! swexpertacademy.com # 2022-02-09 T = int(input()) for tc in range(1, T+1): N = int(input()) nums = list(map(int, input().split())) for i in range(N-1): for j in range(N-1): if nums[j] > nums[j+1]: nums[j], nums[j+1] = nums[j+1], nums[j] print(f'#{tc}', end = ' ') for i in nums: print(i, end = ' ') print.. 2022. 2. 10.
2007 패턴 마디의 길이 SWEA [D2] Python 2007: 패턴 마디의 길이 SW Expert Academy SW 프로그래밍 역량 강화에 도움이 되는 다양한 학습 컨텐츠를 확인하세요! swexpertacademy.com # 2022-02-09 T = int(input()) for tc in range(1, T+1): txt = input() for i in range(1, len(txt)): if txt[0:i] == txt[i:i*2]: print(f'#{tc} {i}') break 문제 요구사항이 정확하지 않다는 것 같은데, 댓글에 나온 엣지케이스들을 다 해보려고 했으나 일단 포기! SWEA가 제시한 답에 맞는 것에 일단 만족... 2022. 2. 10.
MIT OpenCourseWare :: Decomposition, Abstractions, and Functions MIT 6.0001 Introduction to Computer Science and Programming in Python, Fall 2016 Instructor: Dr. Ana Bell In this lecture, Dr. Bell discusses program structuring, functions, specifications, scoping, and the difference between the "return" and "print" keywords in Python. 4. Decomposition, Abstraction, and Functions 2022-02-02 내용 정리, 의역 多 더보기 4. Decomposition, Abstraction, and Functions 지금까지는 파일을 .. 2022. 2. 2.
728x90