Coding Test

    [Python] 코딩 테스트 Cheating Sheet

    >> 참조 점프 투 파이썬 : https://wikidocs.net/book/1 개인 깃허브 : https://github.com/96glory/TIL/tree/master/Python 1. Intro # 변수에 값 넣고 출력하기 a = "Python" print(a) # 조건문 a = 3 if a > 1: print("a is grater than 1") # 반복문 for a in [1, 2, 3]: print(a) i = 0 while i < 3: i = i + 1 print(i) # 함수 def add(a, b): return a + b add(3, 4) # 7 2. 자료형 (1) 숫자형 # 정수형 a = 123 # 실수형 b = 12.3 # 8진수 c = 0o123 # 16진수 d = 0x123 ..

    [C++] 코딩 테스트 Cheating Sheet

    1. 입출력 속도 향상 ios_base::sync_with_stdio(false); cin.tie(NULL);cout.tie(NULL); 2. 모든 라이브러리를 대체하는 라이브러리 #include 3. string과 char *, int의 변환 (1) char * → string char * cStr = "Cstring"; string appStr = cStr; (2) string → char * string cStr = "Cstring"; const char * cStr2 = cStr.c_str(); // const 타입으로 리턴 (3) char * → int char * csTr = "20200701"; int num = atoi(cStr); (4) string → char * → int string..