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
- android
- 파이썬
- Vue
- Flutter
- 코딩테스트
- C++
- 코테
- cos
- 안드로이드스튜디오
- 백준
- codingtest
- vuejs
- 동적계획법과최단거리역추적
- 코드품앗이
- AndroidStudio
- Algorithm
- 알고리즘
- 동적계획법
- 개발
- DFS와BFS
- django
- cos pro
- BAEKJOON
- DART
- DFS
- cos pro 1급
- issue
Archives
- Today
- Total
목록cos 1급 1차 4번 python (1)
Development Artist
![](http://i1.daumcdn.net/thumb/C150x150/?fname=https://blog.kakaocdn.net/dn/7Pnep/btruiR00kgn/QZ3iQbClI4Qp77maailJYK/img.png)
문제 유형 코딩 난이도 normal Note 1. digit을 divisor로 설정. 1로시작하여, 10씩 곱해 간다. (1, 10, 100, 1000, 10000.) 기존의 숫자를 divisor로 나눈다. 그리고 10으로 나눈 나머지가 해당 자리수의 숫자가 된다. Code # -*- coding: utf-8 -*- # UTF-8 encoding when using korean def solution(num): answer = num + 1 digit = 1 while answer // digit % 10 == 0: answer += digit digit *= 10 return answer num = 9949999; ret = solution(num) print("solution 함수의 반환 값은", r..
Algorithm/COS
2022. 2. 24. 20:49