목록전체 글 (232)
honey_pot
t = int(input()) a=b=c=d=n = 0 a = t //300 n = t % 300 b = n //60 n = n % 60 c = n // 10 n = n % 10 if n != 0: print(-1) else: print(a, b, c) 그리디 알고리즘인 거스름돈과 비슷한 문제이다 시간 t를 입력받고 300초, 60초, 10초로 나눈다 가장 큰 300초로 나눈 나머지를 n에 저장하고, 60, 10으로 나누어가며 횟수를 a,b,c에 저장한다. n이 나누어 떨어지지 않으면 -1, 나누어 떨어지면 a,b,c를 출력한다
while(True): m, f = map(int, input().split()) if m==0 and f==0: break print(m+f)
n = int(input()) Q1, Q2, Q3, Q4, AXIS = 0, 0, 0, 0, 0 for i in range(n): x, y = map(int, input().split()) if x >0 and y > 0: Q1 += 1 elif y > 0 > x: Q2 += 1 elif x 0 > y: Q4 += 1 elif x == 0 or y == 0: AXIS += 1 print("Q1: "+str(Q1)) print("Q2: "+str(Q2)) print("Q3: "+str(Q3)) print("Q4: "+str(Q4)) print("AXIS: "+str(AXIS))
hyper terminal 설정파일을 변경하고 다시 실행했더니 아예 창이 안 뜨고 작업 관리자엔 8개씩 떠있는 그런 현상이 생겼다 3번 정도 지우고 다시 깔다가 구글링해서 답을 찾았다. https://github.com/vercel/hyper/issues/4317 Hyper Terminal Not Opening after installation Windows 10. · Issue #4317 · vercel/hyper Hey Guys I used to love The Hyper Terminal.. IT was working fine and i uninstalled it for some reasons.. Now I recently installed it and performed cleaned installa..
REACT CONCEPTS 1. Don't touch the DOM. I'll do it (Declarative not imperative) 2. Build websites like lego blocks 3. Unidirectional data flow : virtualDOM , one way data flow 4. UI, The rest if up to you REACT KEYWORDS Declarative JSX Components Props State VirtualDOM THE JOB OF A REACT DEVELOPER 1. Decide on Components 2. Decide the State and where it lives 3. What changes when state changes np..
포트 번호 3000번을 사용중이라고 계속 오류가 나는 상황이다. 그 전 포트 종료를 못 해서 오류가 나는 듯하여 직접 포트를 죽이고 다시 실행했다. lsof -nP -iTCP:3000 | grep LISTEN kill {포트 번호}
while True: n = int(input()) if n == -1: break else: list1 = [] for i in range(1, n): if n % i == 0: list1.append(i) if sum(list1) == n: print(str(n)+' = '+' + '.join(map(str, list1))) else: print('%d is NOT perfect.' % n) 난... 출력에 약하구나...내일 다시 풀어봐야지 약수 담는 부분 개떡같이 구현하다가 답 안나와서 저 부분 찾아보고 대박사건;;; 완전 천재들이네;;; 하면서 줍줍함 join() 함수도 이렇게 써보는거 처음이다..
import sys x1, y1 = map(int, sys.stdin.readline().split()) x2, y2 = map(int, sys.stdin.readline().split()) x3, y3 = map(int, sys.stdin.readline().split()) if y2 == y3: y4 = y1 elif y1 == y2: y4 = y3 elif y3 == y1: y4 = y2 if x3 == x2: x4 = x1 elif x3 == x1: x4 = x2 elif x1 == x2: x4 = x3 print(x4, y4) x, y 그림 그리면서 썼는데도 if 조건문 틀려서 y4가 정의되지 않았다고 3번이나 떴다^^ 대충 살지 말자