본문 바로가기

분류 전체보기137

[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.
으앙 좋다 죽기전에 못불러볼 노래 2021. 5. 22.
[Codeup] Python 기초 100제(2) 6053부터 [6053] n = bool(int(input())) print(not n) [6054] n1, n2 = input().split() print(bool(int(n1)) and bool(int(n2))) [6055] n1, n2 = input().split() print(bool(int(n1)) != bool(int(n2))) //XOR print((bool(int(n1))and not(bool(int(n2)))) or (not(bool(int(n1)))and bool(int(n2)))) [6056] n1, n2 = input().split() print((bool(int(n1))) == (bool(int(n2)))) [6057] n1, n2 = input().split() print(not.. 2021. 5. 22.