반응형 [문제모음] Programmers(C++): Lv5 총 17문제(2025.02.14 기준)1-10번 문제더보기문제(문제번호)문제 링크풀이신비로운 유적 탐험(1834) 풀이스마트한 프로드(1840) 풀이IU와 콘의 보드게임(1841) 풀이네오의 귀걸이(1842) 풀이직사각형의 넓이(12974) 풀이방의 개수(49190) 풀이문자열의 아름다움(68938) 풀이가짜 해밀토니안(70132) 풀이RPG와 쿼리(76504) 풀이중력 작용(77887) 풀이11-17번 문제더보기문제(문제번호)문제 링크풀이시험장 나누기(81305) 풀이쿼리의 모음의 개수(87394) 풀이집합과 쿼리(214291) 풀이재밌는 레이싱 경기장 설계하기(214292) 풀이중요한 도로(214293) 풀이빠른 이동(214294) 풀이미래 주행 테스트(214295) 풀이 2025. 4. 13. [Roadmap] 컴퓨터 공학 컴퓨터공학 기본기1. C/C++(LTS 기준) 기본 문법- 환경설정(Windows, MacOS, Linux): Visual Studio, GCC- 언어별 특징 및 실행방법: int main(int argc, char** argv)- 코딩컨벤션: camelCase, PascalCase, snake_case, kebap-case, 변수, 함수, 클래스- 변수 및 자료형, 형변환, 상수, primitive type, reference type: char/bool/short/int/long/long long/float/double, const, static- 연산자(산술, 논리, 비교, 비트, 증감, 삼항): +, -, *, /, //, &&, ||, !, ==, !=, , >=, &, |, ~, ++a, a+.. 2025. 2. 7. [SWEA] D1: 연월일 달력(2056) 해설 문제- 문제 링크: 연월일 달력 풀이(C++)solution 1)- 시간 복잡도: 더보기더보기#include#includeusing namespace std;bool is_valid(string month, string day) { int m = stoi(month); int d = stoi(day); if ((m 12)) return false; if (m == 2) { if ((d 28)) return false; } switch(m) { case 1: case 3: case 5: case 7: case 8: case 10: .. 2025. 1. 31. [SWEA] D1: 홀수만 더하기(2072) 해설 문제- 문제 링크: 홀수만 더하기 풀이(C++)solution 1)- 시간 복잡도: 더보기더보기#includeusing namespace std;int main(int argc, char** argv){ int test_case; int T; cin>>T; for(test_case = 1; test_case > num; if (num % 2 == 1) sum += num; } cout (Java)solution 1)- 시간 복잡도: 더보기더보기import java.util.* (Python)solution 1)- 시간 복잡도: 더보기더보기import sysT = int(input())for test_case .. 2025. 1. 31. [SWEA] D1: 평균값 구하기(2071) 해설 문제- 문제 링크: 평균값 구하기 풀이(C++)solution 1)- 시간 복잡도: 더보기더보기#include#include using namespace std;int main(int argc, char** argv){ int test_case; int T; cin>>T; for(test_case = 1; test_case > num; total += num; } cout (Java)solution 1)- 시간 복잡도: 더보기더보기import java.util.* (Python)solution 1)- 시간 복잡도: 더보기더보기import sysT = int(input())for test_case in range(1, T + 1): total = .. 2025. 1. 31. [SWEA] D1: 큰 놈, 작은 놈, 같은 놈(2070) 해설 문제- 문제 링크: 큰 놈, 작은 놈, 같은 놈 풀이(C++)solution 1)- 시간 복잡도: 더보기더보기#includeusing namespace std;int main(int argc, char** argv){ int test_case; int T; cin>>T; for(test_case = 1; test_case > a >> b; if (a > b) cout " (Java)solution 1)- 시간 복잡도: 더보기더보기import java.util.* (Python)solution 1)- 시간 복잡도: 더보기더보기import sysT = int(input())for test_case in range(1, T + 1): a, b = map.. 2025. 1. 31. [SWEA] D1: 최대수 구하기(2068) 해설 문제- 문제 링크: 최대수 구하기 풀이(C++)solution 1)- 시간 복잡도: 더보기#includeusing namespace std;int main(int argc, char** argv){ int test_case; int T; cin>>T; for(test_case = 1; test_case > num; if (num > max_val) max_val = num; } cout (Java)solution 1)- 시간 복잡도: 더보기import java.util.* (Python)solution 1)- 시간 복잡도: 더보기import sysT = int(input())for test_case in range(1, T + .. 2025. 1. 12. [SWEA] D1: 중간값 찾기(2063) 해설 문제- 문제 링크: 중간값 찾기 풀이(C++)solution 1)- 시간 복잡도: 더보기#include#include using namespace std;int main(int argc, char** argv){ int test_case; int T; int n; cin >> n; int arr[n] = {}; for (int i = 0; i > arr[i]; } sort(arr, arr + n); cout (Java)solution 1)- 시간 복잡도: 더보기import java.util.* (Python)solution 1)- 시간 복잡도: 더보기import sysT = int(input())arr = list(map(int, input().split().. 2025. 1. 12. [SWEA] D1: 자릿수 더하기(2058) 해설 문제- 문제 링크: 자릿수 더하기 풀이(C++)solution 1)- 시간 복잡도: 더보기#includeusing namespace std;int main(int argc, char** argv){ int test_case; int T; int n; cin >> n; int sum = 0; while (n > 0) { sum += n % 10; n /= 10; } cout (Java)solution 1)- 시간 복잡도: 더보기import java.util.* (Python)solution 1)- 시간 복잡도: 더보기import sysnum = int(input())total = 0while num > 0: total += num %.. 2025. 1. 12. [SWEA] D1: 알파벳을 숫자로 변환(2050) 해설 문제- 문제 링크: 알파벳을 숫자로 변환 풀이(C++)solution 1)- 시간 복잡도: 더보기#include#include using namespace std;int main(int argc, char** argv){ int test_case; int T; string text; cin >> text; for (int i = 0; i (Java)solution 1)- 시간 복잡도: 더보기import java.util.* (Python)solution 1)- 시간 복잡도: 더보기import systext = input()for i in text: print(ord(i) -64, end=" ") 2025. 1. 12. 이전 1 2 3 4 ··· 13 다음 반응형