728x90
# 백준 브루트 포스 : 2798번 - 분해합
n = int(input())
for i in range(n+1):
num = list(map(int, str(i)))
res = i + sum(num)
if res == n: # 생성자 있는 경우
print(i)
break
if i == n: # 생성자 없는 경우 0 출력
print(0)
최근에 모각코하면서 깃허브 리포지토리 이름을 바꾼게 문제였는지... (난 아직 깃허브 넘 어렵다...ㅜ
git push 하려니까 자꾸 에러가 떴다... 이름도 다시 바꿔보고 remote add 다시 해봐도 안되어서ㅋㅋㅋㅋ
error: failed to push some refs to 'https://github.com/sua01/Baekjoon-Mogakko.git'
hint: Updates were rejected because the tip of your current branch is behind
hint: its remote counterpart. Integrate the remote changes (e.g.
hint: 'git pull ...') before pushing again.
hint: See the 'Note about fast-forwards' in 'git push --help' for details.
구글링해보다가 그냥 에러 신경안쓰고 강제로 push하게 하는 법이 있길래 따라했다.. 이래도 되는건지 모르겠다ㅜㅜ
git push -u origin +master
'Algorithm > Baekjoon' 카테고리의 다른 글
#백준 1436, 파이썬, in 연산자 (0) | 2022.08.26 |
---|---|
#백준 7586, 파이썬, 리스트 (0) | 2022.08.26 |
#백준 2798, 파이썬, 리스트, combinations (0) | 2022.07.21 |
#백준 3053, 파이썬, 소수점 반올림, 소수점 자릿수 표현, f-string (0) | 2022.07.21 |
#백준 3009, 파이썬, append, insert, count 함수 (0) | 2022.07.21 |