import sys
input=sys.stdin.readline
n=input()
a=int(n,8) # 8진수 n 10진수화 시키기
if n=='0':
print(0)
else:
print(bin(a)[2:]) # 2진수 만드는 함수 bin, 무조건 앞에 0b가 따라붙음
a=list(map(int,input().split()))
b=list(map(int,input().split()))
a_s=0
b_s=0
last_winner='D' # 마지막으로 이긴 사람 갱신
for i in range(10):
if a[i]>b[i]:
a_s+=3
last_winner='A'
elif a[i]==b[i]:
a_s+=1
b_s+=1
else:
b_s+=3
last_winner='B'
print(a_s,b_s)
if a_s>b_s:
print("A")
elif a_s==b_s:
print(last_winner)
else:
print('B')
a,b,c=map(int,input().split())
tt=[0]*101 #시간표를 모두 비워놓고 채워나가기
for i in range(3):
s,e=map(int,input().split())
for j in range(s-1,e-1):
tt[j]+=1
answer=0
for i in tt:
if i==1:
answer+=a
elif i==2:
answer+=2*b
elif i==3:
answer+=3*c
print(answer)
n=int(input())
for i in range(n):
problem=input().strip()
if problem=="P=NP":
print("skipped")
else:
a,b=map(int,problem.split('+')) # '+' 기준으로 쪼개기
print(a+b)
No comments yet. Be the first to write!