Programming
[백준] 10951 - A+B -4 (파이썬)
[백준] 10951 - A+B -4 (파이썬)
2020.04.02while True: try: a, b = map(int, input().split()) print(a+b) except: break
[백준] 10952 - A+B -5 (파이썬)
[백준] 10952 - A+B -5 (파이썬)
2020.04.02a = [] while 1 : a = input() a = a.split() if(int(a[0]) == 0 and int(a[1]) == 0): break else: print(int(a[0]) + int(a[1]))
[백준] 10871 - X보다 작은 수 (파이썬)
[백준] 10871 - X보다 작은 수 (파이썬)
2020.04.02num = input() num = num.split() count = int(num[0]) diff = int(num[1]) result = input() result = result.split() temp = [] for i in range(count): if (int(result[i]) < diff): temp.append(result[i]) print(' '.join(temp))
[백준] 2439 - 별찍기 -2 (파이썬)
[백준] 2439 - 별찍기 -2 (파이썬)
2020.04.02a = int(input()) for i in range(1,a+1): print(" "*(a-i) + "*"*i)
[백준] 2438 - 별 찍기 - 1 (파이썬)
[백준] 2438 - 별 찍기 - 1 (파이썬)
2020.04.02a = int(input()) for i in range(1,a+1): print("*" * i)
[백준] 11022 - A+B - 8 (파이썬)
[백준] 11022 - A+B - 8 (파이썬)
2020.04.02import sys inp = int(input()) for i in range(inp): a,b = map(int, sys.stdin.readline().split()) result = a+b print("Case #%s: %s + %s = %s"%(i+1,a,b,result))
[백준] 11021 - A+B - 7 (파이썬)
[백준] 11021 - A+B - 7 (파이썬)
2020.04.02import sys inp = int(input()) for i in range(inp): a,b = map(int, sys.stdin.readline().split()) result = a+b print("Case #%s: %s"%(i+1, result))
[백준] 2742 - 기찍 N (파이썬)
[백준] 2742 - 기찍 N (파이썬)
2020.04.02a = int(input()) for i in range (a): print(a) a -= 1
[백준] 2741 - N 찍기 (파이썬)
[백준] 2741 - N 찍기 (파이썬)
2020.04.02a = int(input()) i = 0 for i in range (1, a+1): print(i)
[백준] 15552 - 빠른 A+B (파이썬)
[백준] 15552 - 빠른 A+B (파이썬)
2020.04.02import sys inp = int(input()) for i in range(inp): a,b = map(int, sys.stdin.readline().split()) print(a+b)
[백준] 8393 - 합 (파이썬)
[백준] 8393 - 합 (파이썬)
2020.04.02num = int(input()) result = 0 for i in range (num+1): result += i print(result)
[백준] 10950 - A+B - 3 (파이썬)
[백준] 10950 - A+B - 3 (파이썬)
2020.04.02num = int(input()) temp1 = [] temp2 = [] result = [] for i in range(num): temp = input() temp = temp.split() add = int(temp[0]) + int(temp[1]) result.append(add) for i in range(num): print(result[i])
[백준] 2739 - 구구단 (파이썬)
[백준] 2739 - 구구단 (파이썬)
2020.04.02num = int(input()) for i in range(1,10): result = num * i print(num,"*",i,"=",result)
[백준] 2884 - 알람 시계 (파이썬)
[백준] 2884 - 알람 시계 (파이썬)
2020.04.02a = input() a = a.split() hour = int(a[0]) minute = int(a[1]) if (minute - 45 < 0) : hour = hour - 1 if(hour < 0): hour = 23 minute = minute + 15 print(hour, minute) else: minute = minute - 45 print(hour, minute)
[백준] 14681 - 사분면 고르기 (파이썬)
[백준] 14681 - 사분면 고르기 (파이썬)
2020.04.02a = int(input()) b = int(input()) if a > 0 and b > 0: print("1") elif a 0: print("2") elif a < 0 and b < 0: print("3") else : print("4")