본문 바로가기

백준1064

[백준] 13597 1 2 3 a,b=map(int, input().split()) if a==b : print(a) else : print(max(a,b)) cs 포커의 족보 생각하시면 구현하는데 도움 되실겁니다. 2021. 3. 5.
[백준] 13311 1 print(-1) cs 음.. 이건 구현보다는 수학적인 내용을 잘 생각하셔야 구할수 있습니다. 문제에서 432자리 이내의 숫자라고 해서 겁먹지 마시고 천천히 modular 의 개념을 생각해보시고 음수의 나눗셈 생각해보시면 쉽게 구합니다. 2021. 3. 4.
[백준] 13136 1 2 3 import math a,b,c=map(int,input().split()) print( math. ceil(a/c)* math.ceil(b/c)) cs 2021. 3. 4.
[백준] 11549 1 2 3 n=int(input()) tmp=list(map(int,input().split())) print(tmp.count(n)) cs 2021. 3. 4.
[백준] 11282 1 2 n=int(input()) print(chr(n+44031)) cs '가'의 아스키코드 값이 44032 이고 이걸 이용하면 쉽게 풀수 있습니다. 2021. 3. 4.
[백준] 9524 1 2 3 4 5 n=int(input()) if n==1:print(1) if n==2:print(7) if n==3:print(2) if n==4:print(3) cs Yekaterinbug 가 설립된(?) 된 연도의 각 자리수를 출력하면됩니다. 라고 하네요 2021. 3. 4.
[백준] 8723 1 2 3 4 tmp=sorted(map(int, input().split())) if tmp[0]== tmp[1] and tmp[1]==tmp[2]: print(2) elif tmp[0]**2+tmp[1]**2==tmp[2]**2: print(1) else: print(0) Colored by Color Scripter cs 주어진 세 숫자가 정삼각형인지 , 직각삼각형인지 구분하는 문제고 line 1에서 sorted를 쓴 이유는 세 숫자가 오름차순이거나 내림차순인지 모르기 때문에 씁니더 2021. 3. 4.
[백준] 8710 1 2 3 4 a,b,c=map(int, input().split()) ans=b-a if ans%c ==0: print(ans//c) else: print(ans//c +1) cs 처음에는 while로 구현했는데 시간초과나와서 간단한 사칙연산으로 바꿔 구현했습니다. 2021. 3. 4.
[백준] 6778 1 2 3 4 5 n=int(input()) a=int(input()) if n>=3 and a 2021. 3. 3.
[백준] 6768 1 2 n=int(input()) print( (n-1)*(n-2)*(n-3)//(3*2*1)) cs 어릴때배웠던 순열조합 경우의수 생각해보시면서 푸시면 쉽습니당 2021. 3. 3.
[백준] 6764 1 2 3 4 5 6 7 8 a=int(input()) b=int(input()) c=int(input()) d=int(input()) if ad : print("Fish Diving") elif a==b and b==c and c==d : print("Fish At Constant Depth") else: print("No Fish") Colored by Color Scripter cs 입력되있는 수들이 증가수열인지 감소하는지 모두 일치하는지 아니면 위 3가지 경우에 모두 해당하지 않는 것인지. 2021. 3. 3.
[백준] 6763 1 2 3 4 5 6 7 8 a=int(input()) b=int(input()) over=b-a if over >=31:print("You are speeding and your fine is $500.") elif over>20:print("You are speeding and your fine is $270.") elif over>0:print("You are speeding and your fine is $100.") else:print("Congratulations, you are within the speed limit!") cs 2021. 3. 3.