coding test(62)
-
[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 -
[coding test] Baekjoon_level 6_함수
Ver. Jupyter Notebook (Anaconda3) ▶ coding test_Baekjoon_level 6_함수 - 백준: baekjoon - 코딩 및 결과: github JeongJaeyoung0/coding_test 코딩테스트. Contribute to JeongJaeyoung0/coding_test development by creating an account on GitHub. github.com 2021.05.29 # coding test_Baekjoon_level 6_함수 # 15596 (정수 N개의 합) def solve(a): return sum(a) # 4673 (셀프 넘버)-1 a=set() b=set(range(10001)) for n in range(10001): i=0 f..
2021.05.29 -
[coding test] Baekjoon_level 5_1차원 배열
Ver. Jupyter Notebook (Anaconda3) ▶ coding test_Baekjoon_level 5_1차원 배열 - 백준: baekjoon - 코딩 및 결과: github JeongJaeyoung0/coding_test 코딩테스트. Contribute to JeongJaeyoung0/coding_test development by creating an account on GitHub. github.com >>> a, *b, c= [1,2,3,4,5] # *를 붙이면 남는 리스트들 전부 >>> print(a) Out: 1 >>> print(b) Out: [2,3,4] >>> print(b) Out: 5 2021.05.28 # coding test_Baekjoon_level 5_1차원 배열 ..
2021.05.28 -
[coding test] Baekjoon_level 4_while문
Ver. Jupyter Notebook (Anaconda3) ▶ coding test_Baekjoon_level 4_while 문 - 백준: baekjoon - 코딩 및 결과: github JeongJaeyoung0/coding_test 코딩테스트. Contribute to JeongJaeyoung0/coding_test development by creating an account on GitHub. github.com - 키 := 표현식 (바다코끼리 연산자: 표현식 결과를 키에 저장) >>> a=5; b=0 >>> while(a:= a-1) : b+=1 >>> print(b) Out: 4 2021.05.27 # coding test_Baekjoon_level 4_while문 # 10952 (A+B -..
2021.05.27 -
[coding test] Baekjoon_level 3_for문
Ver. Jupyter Notebook (Anaconda3) ▶ coding test_Baekjoon_level 3_for 문 - 백준: baekjoon - 코딩 및 결과: github JeongJaeyoung0/coding_test 코딩테스트. Contribute to JeongJaeyoung0/coding_test development by creating an account on GitHub. github.com - a*-~b · ~ 는 b 값을 *(-1)+(1)을 의미 · - 는 뒤의 값을 음수로 바꾸는 의미 - n*-~n//10 : 1 ~ n 까지의 합을 구할 때 사용 - eval() : str의 수를 넣으면 그대로 실행하여 결과 출력 >>> eval('1+2') Out: 3 - exec( ' ..
2021.05.26