일 | 월 | 화 | 수 | 목 | 금 | 토 |
---|---|---|---|---|---|---|
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 | 29 | 30 | 31 |
- Airflow
- pandas
- ds_store
- sort v.s. sorted
- 쿼리
- r-string
- boto3
- 코딩 테스트
- sort(reverse=True) v.s. reverse
- slicing [::-1]
- timestamp
- Python
- CI/CD
- [초급(예비) 개발자 오픈소스 실무 역량강화 교육]
- functools.wraps
- 생각
- blinker
- decorator
- OS
- S3
- 함수형 프로그래밍
- PIP
- 고차함수
- selenium-wire
- 순수함수
- os.path
- reverse v.s. reversed
- Today
- Total
목록코딩 테스트 (3)
공부일지
'''https://codeup.kr/problem.php?id=10941094 : [기초-1차원배열] 이상한 출석 번호 부르기2input1010 4 2 3 6 6 7 9 8 5output5 8 9 7 6 6 3 2 4 10'''import timestart1 = time.time()n = int(input())nums = input().split()nums.reverse()print(' '.join(nums))end1 = time.time()start2 = time.time()n = int(input())nums = input().split()print(' '.join(list(reversed(nums))))end2 = time.time()notice = f'''time1: {end1 - start1}..

'''https://codeup.kr/problem.php?id=14101410 : 올바른 괄호 1input((())()(()))output6 6'''import timestart1 = time.time()gwalho = list(input())left_cnt = 0right_cnt = 0for i in gwalho: if i == '(': left_cnt += 1 elif i == ')': right_cnt += 1print(left_cnt, right_cnt)end1 = time.time()start2 = time.time()from collections import Countercounter = Counter(gwalho)# print(counter.items()..

파이썬으로 코딩테스트를 준비할 때 입력은별도로 import 필요 없는 내장함수 input()이나 import sys를 통해 stdin.readline()을 이용할 수 있다. 눈으로 보기에는 input() 보다 stdin.readline() 더 길고 import 도 하기 때문에 입력시간이 더 길 것 같다.과연 그럴지 한번 확인해보자.'''https://codeup.kr/problem.php?id=14091409 : 기억력 테스트 1input10 9 8 7 6 5 4 3 2 13'''import sysimport timestart1 = time.time()arr = list(map(int, input().split()))k = int(input())print(arr[k-1])end1 = time.time()..