본문 바로가기

python-algorithm1402

[백준] 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.
[백준] 1550 1 print(int(input(),16)) cs 내장함수인 int 의 기능을 이용하면 쉽습니다! 2020. 12. 14.
[백준] 1271 1 2 3 a,b=map(int, input().split()) print(a//b) print(a%b) cs 2020. 12. 14.
[백준] 1075 1 2 3 4 5 6 import sys n=int (sys.stdin.readline()) t=int (sys.stdin.readline()) n= (n//100)*100 for i in range(100): if (n+i)%t==0: print("%.2d"%i) ; exit() cs 2020. 12. 11.
[백준] 1003 1 2 3 4 5 6 7 8 9 10 11 12 c0=[1,0,1] c1=[0,1,1] def fibo(n):#6 l=len(c0)#3 if l 2020. 12. 11.
[백준] 1001 1 2 3 import sys a,b=map(int, sys.stdin.readline().split()) print(a-b) Colored by Color Scripter cs a-b를 구하는 문제입니다. 쉽네요. 2020. 12. 11.
[백준] 1000 A+B 1 2 3 import sys a,b=map(int, sys.stdin.readline().split()) print(a+b) Colored by Color Scripter cs input() 함수보다 sys.stdin.readline() 이 더 빨라서 사용합니다.! split() 함수는 parameter 의 기본값으로 " " 을 쓰고 있습니다 그리고 " "를 기준으로 쪼갠다(split)라고 해석 하시면 됩니다 따라서 line 2는 변수 a,b에 " "기준으로 쪼갠 값을 각각 넣어라 이말입니다. 너무 쉽네요 이런문제만 나왔으면 좋겠습니다 2020. 11. 17.