(파이썬) 백준 1978, 2581, 11653, 1929, 4948, 9020, 1085, 3009, 4153
1978 소수찾기 n = int(input()) a = list(map(int,input().split())) count = 0 for num in a: check =True if num x: a = x if b>y: b = y if a>b: print(b) else: print(a) 두줄 x, y, w, h = map(int, input().split()) print(min(x, y, w-x, h-y)) 3009 네번째 점 x1,y1 = map(int,input().split()) x2,y2 = map(int,input().split()) x3,y3 = map(int,input().split()) xArr = [x1,x2,x3] yArr = [y1,y2,y3] for i in range(len(xArr..
2021. 7. 7.
(파이썬) 백준 1712, 1193, 2869, 10250, 2775, 2839, 1011
1712 손익분기점 A,B,C = map(int, input().split()) if B >=C: print("-1") else: result = A//(C-B) + 1 print(result) 핵심 : A//C-B 1193 분수찾기 n = int(input()) count = 1 while count < n: n-=count count+=1 if count%2==0: down = count-n+1 up = n else: down = n up = count-n+1 print(up,"/",down,sep="") 해당 수의 라인의 찾고 ( 라인은 1씩 증가 ex 1, 2, 3, . .. ) 분모 분자의 특징 찾기. ( 분모 분자가 라인의 짝수 홀수에 따라 반대) 2869 달팽이는 올라가고 싶다 1. 시간초과..
2021. 7. 6.