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 | 29 | 30 |
Tags
- 개발
- cos pro 1급
- 코테
- 분할정복
- DART
- android
- 코드품앗이
- Python
- AndroidStudio
- cos pro
- 안드로이드스튜디오
- 코딩테스트
- C++
- vuejs
- Flutter
- codingtest
- BAEKJOON
- 동적계획법
- DFS와BFS
- DFS
- 알고리즘
- 안드로이드
- 백준
- django
- issue
- 동적계획법과최단거리역추적
- cos
- Algorithm
- docker
- 파이썬
Archives
- Today
- Total
목록cos 1급 1차 계단 게임 python (1)
Development Artist

문제 유형 한줄 수정 난이도 easy Note 1. 계단은 0칸 부터, 마이너스가 없다. 가위바위보에서 졌다고 계속 내려갈 수 없다. Code # -*- coding: utf-8 -*- # UTF-8 encoding when using korean def func(record): if record == 0: return 1 elif record == 1: return 2 return 0 def solution(recordA, recordB): cnt = 0 for i in range(len(recordA)): if recordA[i] == recordB[i]: continue elif recordA[i] == func(recordB[i]): cnt = cnt + 3 else: if cnt > 0: cnt..
Algorithm/COS
2022. 2. 24. 21:57