[백준/C++] 9506 약수들의 합 9506 약수들의 합 #include using namespace std; int main() { ios_base::sync_with_stdio(false); cin.tie(NULL); cout.tie(NULL); while (true) { int num; int check_num = 0; vector num_arr; cin >> num; if (-1 == num) break; for (int i = 1; i Study/Baekjoon 2024.02.19
[백준/C++] 2501 약수 구하기 2501 약수 구하기 #include using namespace std; int main() { ios_base::sync_with_stdio(false); cin.tie(NULL); cout.tie(NULL); int num, index; vector num_arr; cin >> num >> index; for (int i = 1; i Study/Baekjoon 2024.02.19
[백준/C++] 5086 배수와 약수 5086 배수와 약수 #include using namespace std; int main() { ios_base::sync_with_stdio(false); cin.tie(NULL); cout.tie(NULL); while (true) { int a, b; cin >> a >> b; if (0 == a && 0 == b) break; if (0 == b % a) cout Study/Baekjoon 2024.02.19
[백준/C++] 2563 색종이 2563 색종이 #include using namespace std; int main() { ios_base::sync_with_stdio(false); cin.tie(NULL); cout.tie(NULL); int test_case, row = 100, column = 100, ans = 0; vector int_arr(row,vector(column)); cin >> test_case; for (int i = 0; i > witdh >> height; for (int x = witdh; x < witdh + 10; ++x) { for (int y = height; y < height + 10; ++y) { if (0 == .. Study/Baekjoon 2024.02.19
[백준/C++] 10798 세로읽기 10798 세로읽기 #include using namespace std; int main() { ios_base::sync_with_stdio(false); cin.tie(NULL); cout.tie(NULL); vector str_arr(5); string input_string; for (int i = 0; i > input_string; str_arr[i] = input_string; } for (int j = 0; j < 15; ++j) { for (int i = 0; i < 5; ++i) { if (str_arr[i].size()-1 < j) continue; cout Study/Baekjoon 2024.02.19
[백준/C++] 2566 최댓값 https://www.acmicpc.net/problem/2566 2566 최댓값 #include using namespace std; int main() { ios_base::sync_with_stdio(false); cin.tie(NULL); cout.tie(NULL); int row = 9, col = 9 ,max =0, idi=0, idj=0; vector ij_arr(row, vector(col)); for (int i = 0; i > input_num; if (input_num > max) { max = input_num; idi = i; idj = j; } } } cout Study/Baekjoon 2024.02.19
[백준/C++] 10156 과자 #include using namespace std; int main() { int c, n, m; cin>>c>>n>>m; int ans = (c*n)-m; if (ans > 0) cout Study/Baekjoon 2024.02.18
[백준/C++] 25206 너의 평점은 25206 너의 평점은 #include using namespace std; constexpr unsigned int Hash(const char* str) { return str[0] ? static_cast(str[0]) + 0xEDB8832Full * Hash(str + 1) : 8603; } int main() { ios_base::sync_with_stdio(false); cin.tie(NULL); cout.tie(NULL); char grade[50]; string subject; float my_grade,sum_grade=0,major_GPA=0; for (int i = 0; i > subject >> my_grade >> grade; switch (Hash.. Study/Baekjoon 2024.02.17
[백준/C++] 1436 영화감독 숌 1436 영화감독 숌 #include using namespace std; int main() { ios_base::sync_with_stdio(false); cin.tie(NULL); cout.tie(NULL); int input,check_num = 0; cin >> input; int num = 666; while (true) { if (to_string(num).find("666") != string::npos) ++check_num; if (check_num == input) break; ++num; } cout Study/Baekjoon 2024.02.17
[백준/C++] 10988 팰린드롬인지 확인하기 알파벳 소문자로만 이루어진 단어가 주어진다. 이때, 이 단어가 팰린드롬인지 아닌지 확인하는 코드 팰린드롬이란 앞으로 읽을 때와 거꾸로 읽을 때 똑같은 단어를 말한다 level, noon은 팰린드롬이고, baekjoon, online은 팰린드롬이 아니다. #include using namespace std; int main() { ios_base::sync_with_stdio(false); cin.tie(NULL); cout.tie(NULL); vector vec_char; string input; cin >> input; copy(input.begin(), input.end(), back_inserter(vec_char)); for (int i = 0; i < vec_char.size(); ++i) { .. Study/Baekjoon 2024.02.16