본문 바로가기

분류 전체보기1523

[백준] 11109 1 2 3 4 5 6 import sys for _ in range(int(sys.stdin.readline())): d,n,s,p=map(int,sys.stdin.readline().split()) if n*s d + n * p: print("parallelize") elif n * s == d + n * p: print("does not matter") cs 2020. 12. 29.
[백준] 11034 1 2 3 4 5 6 7 import sys while True: try: a,b,c=map(int,sys.stdin.readline().split()) print( max( b-a , c-b)-1) except Exception as e: exit() Colored by Color Scripter cs 2020. 12. 29.
[백준] 11024 1 2 3 4 import sys for _ in range(int(sys.stdin.readline())): tmp=list(map(int,sys.stdin.readline().split())) print(sum(tmp)) Colored by Color Scripter cs 2020. 12. 29.
[백준] 11023 1 2 3 import sys tmp=list(map(int,sys.stdin.readline().split())) print(sum(tmp)) Colored by Color Scripter cs 2020. 12. 29.
[백준] 11006 1 2 3 4 import sys for _ in range(int(sys.stdin.readline())): a,b=map(int, sys.stdin.readline().split()) print(b*2-a, b-(b*2-a)) cs 2020. 12. 28.
[백준] 10992 1 2 3 4 5 6 7 8 import sys n=int(sys.stdin.readline()) if n==1: print("*") else: print(" "*(n-1)+"*") for i in range(n -2): print (" "*(n-2-i)+"*"+" "*(2*i+1)+"*") print("*"*(2*n-1)) cs 2020. 12. 28.
[백준] 10991 1 2 3 4 5 6 7 8 9 import sys n=int(sys.stdin.readline()) if n==1: print("*") elif n==2: print(" *\n* *") else: print(" "*(n-1)+"*") print(" "*(n-2)+"* *") for i in range(n-2): print (" "*(n-3-i)+"* "*(i+2)+"*") cs 2020. 12. 28.
[백준] 10990 1 2 3 4 5 6 7 8 import sys n=int(sys.stdin.readline()) if n==1: print("*") elif n==2: print(" *\n* *") else: print(" "*(n-1)+"*") for i in range(n-1): print(" "*(n-i-2) +"*"+" "*(2*i+1)+"*") cs 2020. 12. 28.
[백준] 10951 1 2 3 4 5 6 while True: try: a,b =map(int, input().split()) print(a+b) except: break cs 2020. 12. 28.
[백준] 10871 1 2 3 4 5 6 a,b=map(int, input().split()) tmp=list(map(int,input().split())) ans=[] for i in range(a): if tmp[i] 2020. 12. 28.
[백준] 10833 1 2 3 4 5 6 import sys cnt=0 for _ in range (int(sys.stdin.readline())): a,b=map(int,sys.stdin.readline().split()) cnt+=b%a print(cnt) Colored by Color Scripter cs 2020. 12. 28.
[백준] 10824 1 2 3 import sys a,b,c,d=sys.stdin.readline().split() print( int (a+b)+int(c+d) ) cs 2020. 12. 28.