Python(108)
-
[coding test] Baekjoon_level 9_기본 수학 2-1
Ver. Jupyter Notebook (Anaconda3) ▶ coding test_Baekjoon_level 9_기본 수학 2-1 - 백준: baekjoon - 코딩 및 결과: github JeongJaeyoung0/coding_test 코딩테스트. Contribute to JeongJaeyoung0/coding_test development by creating an account on GitHub. github.com - all 함수: 모든 요소가 True일 경우 True로 반환 >>> all([1,1,1,]) Out: True >>> all[(1,0,1]) Out: False 2021.06.04 # coding test_Baekjoon_level 9_기본 수학 2-1 # 1978 (소수 찾기)-..
2021.06.04 -
[python] 소수 판별 (에라토스테네스의 체)
Ver. Jupyter Notebook (Anaconda3) ▶ 소수 판별 (에라토스테네스의 체) 코딩: github JeongJaeyoung0/function Contribute to JeongJaeyoung0/function development by creating an account on GitHub. github.com # 소수 판별 import math def prime_number(n): t=[True for i in range(n+1)] # 모든 수 True로 전환 # 에라토스테네스의 체 (소수를 찾는 방법) for i in range(2,int(math.sqrt(n))+1): # 2부터 n^2+1 까지만 확인 if t[i]==True: # i가 소수인 경우 a=2 while i*a
2021.06.03 -
[coding test] Baekjoon_level 8_기본 수학 1-2
Ver. Jupyter Notebook (Anaconda3) ▶ coding test_Baekjoon_level 8_기본 수학 1-2 - 백준: baekjoon - 코딩 및 결과: github JeongJaeyoung0/coding_test 코딩테스트. Contribute to JeongJaeyoung0/coding_test development by creating an account on GitHub. github.com 2021.06.02 # coding test_Baekjoon_level 8_기본 수학 1-2 # 2775 (부녀회장이 될테야)-1 t=int(input()) apart=[[0]*15 for _ in range(15)] for i in range(15): apart[0][i]=i fo..
2021.06.02 -
[coding test] Baekjoon_level 8_기본 수학 1-1
Ver. Jupyter Notebook (Anaconda3) ▶ coding test_Baekjoon_level 8_기본 수학 1-1 - 백준: baekjoon - 코딩 및 결과: github JeongJaeyoung0/coding_test 코딩테스트. Contribute to JeongJaeyoung0/coding_test development by creating an account on GitHub. github.com 2021.06.01 # coding test_Baekjoon_level 8_기본 수학 1-1 # 1712 (손익분기점)-1 a,b,c=map(int,input().split()) if b>=c:print('-1') else:print(a//(c-b)+1) # 1712 (손익분기점)-..
2021.06.01 -
[coding test] Baekjoon_level 7_문자열-2
Ver. Jupyter Notebook (Anaconda3) ▶ coding test_Baekjoon_level 7_문자열-2 - 백준: baekjoon - 코딩 및 결과: github JeongJaeyoung0/coding_test 코딩테스트. Contribute to JeongJaeyoung0/coding_test development by creating an account on GitHub. github.com - 정렬 · [].sort() : 본문을 정렬해서 변환 · sorted([]) : 새로운 리스트를 반환 >>> a='132423' >>> b=sorted(a) # 오름차순 Out: ['1', '2', '2', '3', '3', '4'] >>> b=sorted(a, reverse=True) ..
2021.05.31 -
[coding test] Baekjoon_level 7_문자열-1
Ver. Jupyter Notebook (Anaconda3) ▶ coding test_Baekjoon_level 7_문자열-1 - 백준: baekjoon - 코딩 및 결과: github JeongJaeyoung0/coding_test 코딩테스트. Contribute to JeongJaeyoung0/coding_test development by creating an account on GitHub. github.com - 아스키 코드 · ord(): 문자를 아스키 코드로 변환 · chr(): 아스키 코드 값을 문자로 변환 >>> ord('a') Out: 97 >>> chr(97) Out: 'a' 2021.05.30 # coding test_Baekjoon_level 7_문자열-1 # 11654 (아스키 ..
2021.05.30