Algorithm/Baekjoon

#백준 2231, 파이썬, list, map, 깃허브 에러

say! 2022. 7. 21. 14:24
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