250x250
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 | 29 |
30 |
Tags
- 안드로이드스튜디오
- 동적계획법
- 백준
- DART
- 코드품앗이
- vuejs
- cos pro 1급
- cos
- DFS와BFS
- android
- AndroidStudio
- DFS
- issue
- C++
- 분할정복
- Vue
- Algorithm
- 파이썬
- 코딩테스트
- BAEKJOON
- 알고리즘
- 코테
- Python
- 동적계획법과최단거리역추적
- cos pro
- Flutter
- django
- 개발
- 안드로이드
- codingtest
Archives
- Today
- Total
목록cos pro 1급 배열을 회전시켜보세요 python (1)
Development Artist
[COS Pro 1급, Python] 3차 1번 : 배열을 회전시켜보세요
문제 유형 빈칸 난이도 easy Note 1. func_b 체크. 2개의 배열이 rotate하는지 안하는지 확인하는 함수. first 배열의 요소들은 더하고 second 요소들은 빼줘서 각 인덱스 값이 0이면 rotate 한다. Code # -*- coding: utf-8 -*- # UTF-8 encoding when using korean # 3차 1번 def func_a(arr): ret = arr + arr return ret def func_b(first, second): MAX_NUMBER = 1001 counter = [0 for _ in range(MAX_NUMBER)] for f, s in zip(first, second): counter[f] += 1 counter[s] -= 1 for ..
Algorithm/COS
2022. 2. 25. 11:42