본문 바로가기

분류 전체보기1523

[백준] 10818 1 2 3 4 5 N=int(input()) a=list(map(int,input().split())) a.sort() print("%d %d"%(a[0],a[-1])) cs 2020. 12. 28.
[백준] 10817 1 2 tmp=list(map(int, input().split())) print((sorted(tmp))[1]) cs 이게 지금 난이도 브론즈2 로 책정돼있는데.. 흠 3,4로 낮춰도 될 것 같아요 쉽습니다. 2020. 12. 28.
[백준] 10599 1 2 3 4 5 import sys while True: a,b,c,d=map(int, sys.stdin.readline().split()) if a==b==c==d==0 :exit() print(c-b,d-a) Colored by Color Scripter cs 2020. 12. 28.
[백준] 10569 1 2 3 4 import sys for _ in range(int(sys.stdin.readline())): v,e=map(int, sys.stdin.readline().split()) print(e-v+2) cs 초등학교때 아마 다면체 꼭짓점의수 - 모서리의수 + 면의 수 =2 라는게 나왔던거 같은데 이 내용이 문제에 포함이 안됐다면 쪼끔 생각하기 어려웠을 수도 있다고 생각합니다 2020. 12. 28.
[백준] 10539 1 2 3 4 5 6 7 8 9 10 import sys n=int(sys.stdin.readline()) b=list(map(int,sys.stdin.readline().split())) a=[b[0]] for i in range(1,n): a.append( (i+1)*b[i]-sum(a[:i]) ) for _ in range(n): print(a[_], end=' ') cs 2020. 12. 28.
[백준] 10474 1 2 3 4 5 6 import sys while True: a,b=map(int,sys.stdin.readline().split()) if a==b==0: break else: print("%d %d / %d"%(a//b , a%b ,b )) cs 2020. 12. 28.
[백준] 10419 1 2 3 4 5 import sys for _ in range(int(sys.stdin.readline())): n=int(sys.stdin.readline()) for i in range(10000): if i*(i+1) 2020. 12. 28.
[백준] 10409 1 2 3 4 5 6 7 8 import sys n,t= map(int,sys.stdin.readline().split()) tmp=list(map(int, sys.stdin.readline().split())) cnt=0 for i in range(n): if t-tmp[i]>=0: cnt+=1; t-=tmp[i] else: break print(cnt) Colored by Color Scripter cs 2020. 12. 25.
[백준] 10520 1 2 3 4 5 6 7 8 9 N=int(input()) for i in range(N): h,w,n=map(int,input().split()) if n%h==0: ans=h*100+int (n/h) print(ans) else : ans = (n%h)*100+int(n/h)+1 print (ans) cs 2020. 12. 25.
[백준] 10103 1 2 3 4 5 6 7 8 9 import sys scoreChang=100 scoreSang=100 for _ in range(int(sys.stdin.readline())): a,b=map(int,sys.stdin.readline().split()) if a b: scoreSang -= a print(scoreChang) print(scoreSang) cs 2020. 12. 25.
[백준] 9610 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 import sys cnt1=0; cnt2=0; cnt3=0;cnt4=0;cntax=0 for _ in range(int(sys.stdin.readline())): a,b=map(int, sys.stdin.readline().split()) if a ==0 or b==0 : cntax+=1 elif a>0 and b>0: cnt1+=1 elif a 0: cnt2 += 1 elif a 2020. 12. 25.
[백준] 9550 1 2 3 4 5 6 7 8 import sys for _ in range(int(sys.stdin.readline())): n,k=map(int, sys.stdin.readline().split()) cnt=0 tmp=list(map(int,sys.stdin.readline().split())) for i in range(n): cnt+=tmp[i]//k print(cnt) Colored by Color Scripter cs 2020. 12. 25.