Notice
Recent Posts
Recent Comments
Link
250x250
일 | 월 | 화 | 수 | 목 | 금 | 토 |
---|---|---|---|---|---|---|
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
- 안드로이드
- Python
- 백준
- DART
- cos pro
- 코테
- 동적계획법
- codingtest
- Flutter
- DFS와BFS
- 알고리즘
- android
- vuejs
- 개발
- 분할정복
- 안드로이드스튜디오
- issue
- Algorithm
- django
- cos
- BAEKJOON
- 코딩테스트
- cos pro 1급
- C++
- DFS
- AndroidStudio
- 코드품앗이
- 파이썬
- 동적계획법과최단거리역추적
- Vue
Archives
- Today
- Total
목록cos 배열을 회전시켜보세요 python (1)
Development Artist
![](http://i1.daumcdn.net/thumb/C150x150/?fname=https://blog.kakaocdn.net/dn/biNR08/btruefCiqXY/JAkl2Ezij38BjmmUmVj2H1/img.png)
문제 유형 빈칸 난이도 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