algorithm (69) 썸네일형 리스트형 백준 2744번 대소문자 바꾸기 https://www.acmicpc.net/problem/2744 아이디어:1. string 자료형 사용 > for문, 배열처럼 접근 가능2. ascii코드 값 활용 > 대문자 + 32 = 소문자, 소문자 - 32 = 대문자 // 2744#include using namespace std;int main() { ios::sync_with_stdio(false); cin.tie(NULL); string str; cin >> str; for (int i = 0; i 백준 10872번 팩토리얼 https://www.acmicpc.net/problem/10872 아이디어:1. 원래라면 dp를 써서 푸는게 맞는데, N 범위가 낮아서 반복문 사용2. 결과값이 커서 long 자료형 사용3. 결과값 변수는 1로 초기화하고 반복문도 1부터 시작한다. // 10872#include using namespace std;int main() { ios::sync_with_stdio(false); cin.tie(NULL); int n; long answer = 1; cin >> n; for (int i = 1; i 백준 2741번 N 찍기 https://www.acmicpc.net/problem/2741 아이디어:for문으로 출력 // 2741#include using namespace std;int main() { ios::sync_with_stdio(false); cin.tie(NULL); int n; cin >> n; for (int i = 0; i 백준 2420번 사파리월드 https://www.acmicpc.net/problem/2420 아이디어:절댓값을 활용할 수 있는지 묻는 문제1. 정수 범위가 넓어 long long 자료형 사용2. 정수 절댓값을 위해 cstdlib 라이브러리 > abs 함수 사용// 2420#include #include using namespace std;int main() { ios::sync_with_stdio(false); cin.tie(NULL); long long n, m; cin >> n >> m; cout 백준 7287번 등록 https://www.acmicpc.net/problem/7287 아이디어:출력이 가능한지 묻는 문제내 프로필 > 맞았습니다를 출력해서 자꾸 틀렸는데 정답은 맞은 문제를 출력해야한다. // 7287#include using namespace std;int main() { ios::sync_with_stdio(false); cin.tie(NULL); cout 이전 1 ··· 9 10 11 12 13 14 다음