목록전체 글 (232)
honey_pot
n = int(input()) res1=res0=0 for _ in range(n): a = int(input()) if a==1: res1+=1 else: res0+=1 if res1 > res0: print("Junhee is cute!") else:print("Junhee is not cute!")
v = int(input()) vote = input() A=B=0 for i in range(len(vote)): if vote[i]=='A': A += 1 else: B+=1 if A > B: print("A") elif A ==B: print("Tie") else: print("B")
n = int(input()) for _ in range(n): 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")
res = 10 a = input() for i in range(1, len(a)): res +=10 if a[i-1] != a[i] else 5 print(res) 그릇의 모양이 같으면 5, 다르면 10을 더해주는 문제이다.
a = input() pal = 1 for i in range(len(a)//2): # 0부터 문자열 길이의 절반만큼 반복 if a[i] == a[-1-i]: pass else: pal =0 print(pal) 투 포인터를 이용하는 팰린드롬 문제
while True: a, b = map(int, input().split()) if a==0 and b==0: break elif b % a == 0 : print("factor") elif a % b ==0 : print("multiple") else: print("neither")
t = int(input()) for _ in range(t): ys = ko = 0 for _ in range(9): y, k = map(int, input().split()) ys+=y ko+=k if ys > ko : print("Yonsei") elif ys == ko: print("Draw") else: print("Korea")