🔍 쉬운 문제이다
0 ~ 99 숫자를 받아 0의 자리 숫자가 다음 수의 10의 자리, 0의 자리 10의 자리 숫자를 더한 0의 자리 숫자가 다음 수의 0의 자리로 오는 문제이다.
글만 봐서는 좀 어려우니 문제 참고..ㅎㅎ
import sys
temp = list(map(int, sys.stdin.readline().split()))[0]
def solution(temp: int) -> int:
cnt = 0
result = temp
temp = str(temp)
while 1:
if len(temp) == 1:
temp = '0' + temp
first = temp[1]
second = int(temp[0]) + int(temp[1])
if len(str(second)) == 1:
temp = first + str(second)
else:
temp = first + str(second)[1]
cnt += 1
if int(temp) == result:
break
return cnt
🔍pycharm 만 써온 나지만 추 후 C++을 할 것이기에 시간이 좀 있어 vscode 를 받아 설정을 pycharm과 비슷 하게 하였다.
🔍vscode는 신기하게 설정 스크립트가 있었으며, UI가 익숙하지 않아 조금 애 먹었지만 금새 익숙해 졌다. 두 가지 IDLE을 쓸 예정인데 알고리즘 공부를 하기엔 가벼운 vscode가 훨~~~ 씬 괜찮은 것 같다.
🔍pycharm 에서 Xcode-Dark 라는 theme를 엄청 좋아하는데 vscode에 똑같은 것은 없어 조금 아쉬웠다... ㅠㅠ
🔍난 vim을 사용하는 유저인데 vscode 에서 vim 설정을 만지다 보니 조금 시간이 걸렸다.
🔍vi on off 바꾸기
- 난 vi를 끌 일이 없지만 이게 꺼지는 옵션인지 몰라 당황했다 Control + p를 누르면 설정? 이 나오는데
클릭하면 vi 설정이 꺼진다..ㅎ
{
"workbench.iconTheme": "material-icon-theme",
"workbench.startupEditor": "none",
"vim.visualModeKeyBindingsNonRecursive": [
],
"vim.handleKeys": {
"<C-d>": false,
"<C-c>": false,
"<C-s>": false,
"<C-z>": false,
"<C-a>": false,
"<C-v>": false
},
"tegrated.fontFamily": "monospace",
"editor.mouseWheelZoom": true,
"terminal.integrated.fontSize": 16,
"settingsSync.ignoredSettings": [
"-window.zoomLevel"
],
"workbench.colorTheme": "Xcode Partial (Dark)"
}