python-algorithm1422 [백준] 5361 1 2 3 4 import sys for _ in range(int(sys.stdin.readline())): a,b,c,d,e=map(int, sys.stdin.readline().split()) print("$%.2f"%(a*350.34+b*230.90+c*190.55+d*125.30+e*180.90)) cs 이 문제가 왜 브론즈3인지는 이해가 되질 않네요 2020. 12. 23. [백준] 5086 1 2 3 4 5 6 7 import sys while True: a,b=map(int, sys.stdin.readline().split()) if (a,b)== (0,0): break elif b%a==0: print("factor") elif a%b==0: print("multiple") else : print("neither") cs 2020. 12. 23. [백준] 5073 1 2 3 4 5 6 7 8 import sys while True: a,b,c=map(int, sys.stdin.readline().split()) if a==0 and b==0 and c==0: break elif (a+b+c -max(a,b,c)) 2020. 12. 23. [백준] 4892 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 import sys cnt=1 while True: n0=int(sys.stdin.readline()) if n0==0: break else: n1=n0*3 if n1%2==0: n2=int (n1/2) else: n2= int ( (n1+1)/2) n3=3*n2 n4= int (n3/9) if n1%2==1: print("%d. odd %d"%(cnt,n4)) else: print("%d. even %d"%(cnt,n4)) cnt+=1 Colored by Color Scripter cs 2020. 12. 23. [백준] 4880 1 2 3 4 5 6 import sys while True: a,b,c= map(int, sys.stdin.readline().split()) if a ==b and b==c and a==0: break if c-b==b-a: print("AP %d"%(c+c-b)) elif c//b==b//a : print("GP %d"%(c*c/b)) cs 등차수열, 등비수열 생각해보시면 금방 풀 수 있습니다! 2020. 12. 23. [백준] 4766 1 2 3 4 5 6 7 import sys tmp=float(sys.stdin.readline()) while True: n=float(sys.stdin.readline()) if int (n)==999: break print("%.2f"%(n-tmp)) tmp=n cs tmi: pnu cse는 일반 화학 실험을 하지 않는다. 2020. 12. 23. [백준] 4690 1 2 3 4 5 6 7 for a in range (2,101): for b in range(2, 101): for c in range(2, 101): for d in range(2, 101): if pow(a,3)==pow(b,3)+pow(c,3)+pow(d,3): if b 2020. 12. 23. [백준] 4504 1 2 3 4 5 6 7 8 import sys n=int(sys.stdin.readline()) while True: a=int(sys.stdin.readline()) if a==0: break else: if a%n==0: print("%d is a multiple of %d."%(a,n)) else: print("%d is NOT a multiple of %d."%(a,n)) cs 2020. 12. 23. [백준] 4493 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 import sys n=int(sys.stdin.readline()) for _ in range(n): a=int(sys.stdin.readline()) cnt1=0 cnt2=0 for i in range(a): p1,p2=sys.stdin.readline().split() if p1=='R': if p2=='P':cnt2+=1 elif p2=='S':cnt1+=1 if p1 == 'P': if p2 == 'R': cnt1 += 1 elif p2 == 'S': cnt2 += 1 if p1=='S': if p2=='P':cnt1+=1 elif p2=='R':cnt2+=1 if cnt1>cnt2: print.. 2020. 12. 23. [백준] 4101 1 2 3 4 5 6 7 import sys while True: a,b =map(int, sys.stdin.readline().split()) if a==0 and b==0: exit() else: if a>b: print("Yes") else : print("No") cs 2020. 12. 23. [백준] 3486 1 2 3 4 5 6 7 for _ in range(int(input())): a,b=map(str, input().split()) ans=int(str(a)[::-1])+int(str(b)[::-1]) while ans%10 ==0: ans=ans/10 ans=int(ans) print(str(ans)[::-1]) cs 백준 문제를 난이도 낮은 순부터 풀고 있는데 전부 다 풀기엔 시간이 걸릴것같아 한글로 된 문제부터 풀자고 생각했는데 어쩌다 풀게 됐습니다. 2020. 12. 23. [백준] 3460 1 2 3 4 5 6 7 8 9 10 11 12 import sys t=int(sys.stdin.readline()) for _ in range(t): n=int(sys.stdin.readline()) tmp=[] while n//2!=0: tmp.append(n%2) n=n//2 tmp.append(n%2) #print (tmp) for i in range(len(tmp)): if tmp[i]==1: s=print(i,end=' ') cs 2020. 12. 23. 이전 1 ··· 107 108 109 110 111 112 113 ··· 119 다음