본문 바로가기

Algorithm27

Baekjoon - for [2739] n = int(input()) for i in range(1,10): print(n, '*', i, '=', n*i) [10950] t = int(input()) for i in range(t): a, b = map(int, input().split()) print(a + b) [8393] n = int(input()) r = 0 for i in range(n+1): r = r + i print(r) [15552] import sys n = int(input()) for i in range(n): a, b = map(int, sys.stdin.readline().split()) print(a + b) [2741] n = int(input()) for i in range(1,n+1): prin.. 2021. 5. 30.
Baekjoon - if [1330] a, b = map(int, input().split()) if a > b : print(">") elif a < b : print(" 2021. 5. 30.
[Codeup] Python 기초 100제(6) [6098] d = [] for i in range(10): d.append(list(map(int, input().split()))) x, y = 1, 1 while True: if d[x][y] == 2: d[x][y] = 9 break if d[x][y+1] != 1: d[x][y] = 9 y += 1 else: if d[x+1][y] != 1: d[x][y] = 9 x += 1 else: d[x][y] = 9 break for i in range(10): for j in range(10): print(d[i][j],end=' ') print() [결과] 1 1 1 1 1 1 1 1 1 1 1 0 0 1 0 0 0 0 0 1 1 0 0 1 1 1 0 0 0 1 1 0 0 0 0 0 0 1 0 1 1.. 2021. 5. 27.
[Codeup] Python 기초 100제(5) [6095] n = int(input()) d = [] for i in range(20): d.append([]) for j in range(20): d[i].append(0) for i in range(n): x, y = map(int,input().split()) d[x][y] = 1 for i in range(1,20): for j in range(1,20): print(d[i][j],end=' ') print() [6096] d = [[]*19 for _ in range(19)] for i in range(19): # 0~18 d[i] = list(map(int, input().split())) n = int(input()) for i in range(n): x, y = map(int,input(.. 2021. 5. 26.
[Codeup] Python 기초 100제(4) [6084] h, b, c, s = map(int, input().split()) bit = h * b * c * s #bit mbyte = float(bit / 8 / 1024 / 1024) #MB print(format(mbyte,".1f"),"MB") [6085] w, h, b = map(int, input().split()) bit = w * h * b mbyte = float(bit/8/1024/1024) print(format(mbyte, ".2f"),"MB") [6086] n = int(input()) cnt = 0 sum = 0 while True: cnt += 1 sum += cnt if sum >= n: break print(sum) [6087] n = int(input()) for i.. 2021. 5. 25.
[Codeup] Python 기초 100제(3) [6064] n1, n2, n3 = input().split() n1 = int(n1) n2 = int(n2) n3 = int(n3) nValue1 = n1 if n1 < n2 else n2 nValue2 = nValue1 if nValue1 < n3 else n3 print(nValue2) [6065] n1, n2, n3 = input().split() n1 = int(n1) n2 = int(n2) n3 = int(n3) if n1 % 2 == 0: print(n1) if n2 % 2 == 0: print(n2) if n3 % 2 == 0: print(n3) [6066] n1, n2, n3 = input().split() n1 = int(n1) n2 = int(n2) n3 = int(n3) if n1 .. 2021. 5. 24.