Python158 백준 - 2748 피보나치 수 2 a = 0 b = 1 c = 0 n = int(input()) for i in range(n): c = a+b a = b b = c print(a) 2022. 10. 13. 백준 - 2506 점수계산 n = int(input()) num = list(map(int, input().split())) point = 0 addpoint = 0 for i in range(n): if num[i] == 1: point = point + addpoint + 1 addpoint += 1 else: addpoint = 0 print(point) 2022. 10. 12. 백준 - 7891 Can you add this? t = int(input()) for i in range(t): a, b = map(int, input().split()) print(a+b) 2022. 10. 11. 백준 - 10886 0 = not cute / 1 = cute n = int(input()) count0 = 0 count1 = 1 for i in range(n): s = int(input()) if s == 1: count1 += 1 else: count0 += 1 if count1 > count0: print("Junhee is cute!") else: print("Junhee is not cute!") 2022. 10. 10. 이전 1 2 3 4 5 6 7 8 ··· 40 다음