Programming [Python] (411) 썸네일형 리스트형 #186 백준 파이썬 [10162] 전자레인지 https://www.acmicpc.net/problem/10162 #Solution T = int(input()) if T % 10 != 0: print(-1) else: A = B = C = 0 A = T // 300 B = (T % 300) // 60 C = (T % 300) % 60 // 10 print(A, B, C) #185 백준 파이썬 [9610] 사분면 https://www.acmicpc.net/problem/9610 #Solution case = int(input()) Q1 = Q2 = Q3 = Q4 = AXIS = 0 for _ in range(case): x, y = map(int, input().split()) if x == 0 or y == 0: AXIS += 1 elif x > 0 and y > 0: Q1 += 1 elif x 0: Q2 += 1 elif x 0 and y < 0: Q4 += 1 print("Q1: %d" %(Q1)) print("Q2: %d" %(Q2)) print("Q3: %d" %(Q3)) print("Q4: %d" %(Q4)) print("A.. #184 백준 파이썬 [10988] 팰린드롬인지 확인하기 https://www.acmicpc.net/problem/10988 #Solution word = list(str(input())) if list(reversed(word)) == word: print(1) else: print(0) #183 백준 파이썬 [5717] 상근이의 친구들 https://www.acmicpc.net/problem/5717 #Solution a, b = map(int, input().split()) while not (a == 0 and b == 0): print(a+b) a, b = map(int, input().split()) #182 백준 파이썬 [10886] 0 = not cute / 1 = cute https://www.acmicpc.net/problem/10886 #Solution V = int(input()) cute = 0 for _ in range(V): if int(input()) == 1: cute += 1 if cute > V//2: print("Junhee is cute!") else: print("Junhee is not cute!") #181 백준 파이썬 [10102] 개표 https://www.acmicpc.net/problem/10102 #Solution V = int(input()) vote = list(str(input())) A = B = 0 for v in vote: if v == 'A': A += 1 else: B += 1 if A > B: print('A') elif A == B: print('Tie') else: print('B') #180 백준 파이썬 [5063] TGN https://www.acmicpc.net/problem/5063 #Solution case = int(input()) for _ in range(case): r, e, c = map(int, input().split()) if r > e - c: print('do not advertise') elif r == e - c: print('does not matter') else: print('advertise') #179 백준 파이썬 [7567] 그릇 https://www.acmicpc.net/problem/7567 #Solution dish = list(str(input())) answer = 0 for i in range(len(dish)): if i == 0: answer += 10 elif dish[i] == dish[i-1]: answer += 5 else: answer += 10 print(answer) 이전 1 ··· 26 27 28 29 30 31 32 ··· 52 다음