6081

n = int(input(), 16)
for i in range(1, 16):
    print('%X'%n, '*%X'%i, '=%X'%(n*i), sep='')

6082

i = int(input())
for h in range(1, i+1):
    if h%10==3 or h%10==6 or h%10==9:
        print("X", end=' ')
    else:
        print(h, end=' ')

6083

r, g, b = map(int, input().split())
num = 0

for i in range(0, r):
    for j in range(0, g):
        for h in range(0, b):
            print(i, j, h)
            
            num+=1
print(num)

6084

h, b, c, s = map(int, input().split())
space = (h*b*c*s)/8/1024/1024

print(round(space, 1) ,"MB")

h, b, c, s = map(int, input().split())
space = (h*b*c*s)/8/1024/1024

print(format(space, ".1f"), "MB")

6085

#반올림이 아닌 소수점 2자리까지 표기하는거인듯
#전에 했던 코드처럼 입력했더니 0.00으로 나와야하는 값이 0.0으로 출력됨

w, h, b = map(int, input().split())
space = ((w*h*b)/8/1024/1024)

print(format(space, ".2f"), "MB")

6086

n = int(input())
s,c = 0,1

while True:
    s += c 
    c += 1
    if s >= n:
        break

print(s)

6087

n = int(input())

for i in range(1, n+1):
    if i%3 == 0:
        continue
    print(i, end=' ')

6088

a, d, n = map(int, input().split())
count = 1 #a+b부터가 2번째 숫자여서 처음값을 1로 설정

while True:
    a += d 
    count += 1
    if count == n:
        break

print(a)

6089

a, r, n = map(int, input().split())
count = 1 

while True:
    a *= r 
    count += 1
    if count == n:
        break

print(a)

6090

a, m, d, n = map(int, input().split())
count = 1 

for i in range(n-1):
    a = a*m+d
print(a)

#첫번째, 즉 range에서 0은 처음 지정한 a의 값이 아닌 계산된 2번째 수열이 해당되기 때문에 range(n-1)임
#range(n)으로 했을 때 출력결과는 -1 3 -5 11 -21  임

6091

a, b, c = map(int, input().split())
d = 1

while True:
    if d%a==0 and d%b==0 and d%c==0:
        break
    d += 1

print(d)

#문제 제공코드 사용 - 더 빠름
a, b, c = map(int, input().split())
d = 1

while d%a!=0 or d%b!=0 or d%c!=0:
    d += 1
print(d)

6092

n = int(input())
a = input().split()

for i in range(n):
    a[i] = int(a[i])

d = []
for i in range(24):
    d.append(0)

for i in range(n):
    d[a[i]] += 1

for i in range(1, 24):
    print(d[i], end = ' ')

6093

#문제에 제공된 코드 사용
n = int(input())
k = input().split()

for i in range(n-1, -1, -1):
    print(k[i], end=' ')

#다른풀이
n = int(input())
k = input().split()

a = list(reversed(k))
b = list(map(int, a))
c = str(b)[1:-1]
print(c.replace(",",""))

6094

n = int(input())
k = map(int, input().split())

print(min(k))

6095

d = [[0 for j in range(20)] for i in range(20)]

n = int(input())
for i in range(n):
    x, y = input().split()
    d[int(x)][int(y)] = 1

for i in range(1, 20):
    for j in range(1, 20):
        print(d[i][j], end=' ')
    print()


d = []
for i in range(20):
    d.append([])
    for j in range(20):
        d[i].append(0)

n = int(input())
for i in range(n):
    x, y = input().split()
    d[int(x)][int(y)] = 1

for i in range(1, 20):
    for j in range(1, 20):
        print(d[i][j], end=' ')
    print()

6096

d = []
for i in range(20):
    d.append([])
    for j in range(20):
        d[i].append(0)

for i in range(1, 20):
    data = input().split()
    for j in range(1, 20):
        d[i][j] = int(data[j-1]) 
        
n = int(input())

for i in range(n):
    x,y = input().split()
    for j in range(1,20):
        if d[j][int(y)]==1:
            d[j][int(y)]=0
        else:
            d[j][int(y)]=1

        if d[int(x)][j]==1:
            d[int(x)][j]=0
        else:
            d[int(x)][j]=1

for i in range(1, 20):
    for j in range(1, 20):
        print(d[i][j], end=' ')
    print()

6097

h, w = map(int, input().split())

a = []
for i in range(h):
    a.append([])
    for j in range(w):
        a[i].append(0)

n = int(input())

for i in range(n):
    l, d, x, y = map(int,input().split())
    for j in range(l):
        a[int(x-1)][int(y-1)] = 1
        if d == 1:
            x += 1
        elif d == 0:
            y += 1

for i in range(h):
    for j in range(w):
        print(a[i][j], end=' ')
    print()

6098

d = [[0 for j in range(10)] for i in range(10)]

for i in range(10):
    d[i] = list(map(int, input().split()))

x = 1
y = 1

while True:
    if d[x][y] == 0:
        d[x][y] = 9
    if d[x][y] == 2:
        d[x][y] = 9
        break
    if d[x][y+1] == 1 and d[x+1][y] == 1:
        break
    if d[x][y+1] != 1:
        y += 1
    elif d[x+1][y] != 1:
        x += 1

for i in range(10):
    for j in range(10):
        print(d[i][j], end=' ')
    print()