코딩테스트 준비 3

그리디 알고리즘

Greedy Algorithm - 어떤 문제가 있을때 단순 무식하게, 탐욕적으로 문제를 푸는 알고리즘 - 현재 상황에서 가장 좋아보이는 것만 선택 그리디 알고리즘 문제 풀이 https://github.com/dlwltn98/practiceCodingTest/tree/main/greedy GitHub - dlwltn98/practiceCodingTest: 코딩테스트 문제 풀이 코딩테스트 문제 풀이. Contribute to dlwltn98/practiceCodingTest development by creating an account on GitHub. github.com

Python 공부2 (코드업 기초 100제)

1097번부터 1099번까지 1097 : [기초-2차원배열] 바둑알 십자 뒤집기 시간 제한: 1 Sec 메모리 제한: 128 MB https://www.codeup.kr/problem.php?id=1097 내가 쓴 답 arr = [[0]*19]*19 for i in range(0,19): arr[i] = list(map(int,input().split())) n = int(input()) for i in range(0,n): x,y = map(int,input().split()) for j in range(0,19): if arr[x-1][j] == 0: arr[x-1][j] = 1 else: arr[x-1][j] = 0 for z in range(0,19): if arr[z][y-1] == 0: arr..

Python 공부(코드업 기초 100제)

codeup.kr 기초 100제 1001번부터 1096번 특수 문자 출력 print('"!@#$%^&*()"') print('"C:\Download\hello.cpp"') 유니코드 출력 함수 print('\u250C\u252C\u2510\n') // \u뒤에 유니코드 작성 정수를 입력 받아 출력 n = int(input()) print(n) 문자 입력 받아 출력 char = input() print(char) 실수 입력 받아 소수점 6자리까지 표시 a = float(input()) print("%f" %a) 정수 2개 입력 받아서 그대로 출력 map() - 여러 데이터를 한번에 다른 형태로 변환 a, b = map(int, input().split()) print(a,b) 문자 2개 입력 받아서 순서 바..