본문 바로가기

python-algorithm1422

[백준] 10171 1 2 3 4 print("\ /\\") print(" ) ( ')") print("( / )") print(" \(__)|") cs 고양이 vs 강아지 저는 고양이! 2020. 12. 14.
[백준] 8393 1 2 3 import sys n=int(sys.stdin.readline()) print (int ( (1+n)*n/2)) cs 사실 n을 입력받고 반복문을 통해 더해줘도 되지만, 그럴경우에는 주어진 n이 최대가 1만이라 문제가 없겠지만 엄청 큰 수로 가게 되면 메모리의 load가 심해질것같아서 등차수열 합 으로 뚝딱! 2020. 12. 14.
[백준] 5554 1 2 3 4 5 6 import sys ans=0 for _ in range(4): ans+=int(sys.stdin.readline()) print(ans//60) print(ans%60) cs 초 단위니까 분, 초로 나눠서 출력하면 됩니다~ 2020. 12. 14.
[백준] 5338 1 2 3 4 5 print(" _.-;;-._") print ("'-..-'| || |") print("'-..-'|_.-;;-._|") print ("'-..-'| || |") print ("'-..-'|_.-''-._|") cs 2020. 12. 14.
[백준] 5337 1 2 3 print(". . .") print("| | _ | _. _ ._ _ _") print ("|/\|(/.|(_.(_)[ | )(/.") cs 이 문제는 주의 할 부분이 없지만 종종 "(quotation mark) 과 같은 문자는 출력할때 주의 해주셔야 합니다 2020. 12. 14.
[백준] 3046 1 2 R1, S=map(int, input().split()) print(S*2-R1) cs 2020. 12. 14.
[백준] 3003 1 2 3 4 5 6 tmp=[1,1,2,2,2,8] ans=list(map(int,input().split())) for i in range(6): if i!=5: print(tmp[i]-ans[i],end=" ") else : print(tmp[i]-ans[i]) cs 2020. 12. 14.
[백준] 2845 1 2 3 A,B=map(int,(input().split())) tmp=list(map(int, input().split())) print("%d %d %d %d %d"%(-A*B+tmp[0],-A*B+tmp[1],-A*B+tmp[2],-A*B+tmp[3],-A*B+tmp[4])) cs 2020. 12. 14.
[백준] 2558 1 2 3 4 import sys a=int(sys.stdin.readline()) b=int(sys.stdin.readline()) print(a+b) cs 2020. 12. 14.
[백준] 2557 1 print("Hello World!") cs 근본이죠 Hello World! 2020. 12. 14.
[백준] 2475 1 2 3 a,b,c,d,e=map(int, input().split()) print( (a*a+b*b+c*c+d*d+e*e)%10) cs 2020. 12. 14.
[백준] 2338 1 2 3 4 5 6 A=int(input()) B=int(input()) print(A+B) print(A-B) print(A*B) cs 2020. 12. 14.