[알고리즘] 백준 11006 - 남욱이의 닭장 (C++) [문제 링크] : https://www.acmicpc.net/problem/11006#include using namespace std;int main(){ int T, N, M; int A, B; cin >> T; for(int i=0; i> N >> M; A = M - (N - M); B = N - M; cout 알고리즘 2024.10.30
[알고리즘] 백준 25191 - 치킨댄스를 추는 곰곰이를 본 임스 (C++) [문제 링크] : https://www.acmicpc.net/problem/25191#include using namespace std;int A, B, C;int main(){ cin >> A >> B >> C; cout 알고리즘 2024.10.30
[알고리즘] 백준 26711 - A+B (C++) [문제 링크] : https://www.acmicpc.net/problem/26711#include #include using namespace std;int N;string A, B, Ans;int C;int main(){ ios::sync_with_stdio(0); cin.tie(0); cout.tie(0); cin >> A >> B; reverse(A.begin(), A.end()); reverse(B.begin(), B.end()); while(A.length() 9){ C = 1; tmp -= 10; } else{ C = 0; } Ans += tmp.. 알고리즘 2024.10.28
[알고리즘] 백준 16204 - 카드 뽑기 (C++) [문제 링크] : https://www.acmicpc.net/problem/16204#include using namespace std;int N, M, K;int main(){ cin >> N >> M >> K; cout 알고리즘 2024.10.27
[알고리즘] 백준 10539 - 수빈이와 수열 (C++) [문제 링크] : https://www.acmicpc.net/problem/10539#include using namespace std;int main(){ int N; cin >> N; int sum = 0, M, res; for(int i=0; i> M; res = M * (i + 1) - sum; cout 알고리즘 2024.10.26
[알고리즘] 백준 26082 - WARBOY (C++) [문제 링크] : https://www.acmicpc.net/problem/26082#include using namespace std;int main(){ int A, B, C; cin >> A >> B >> C; cout 알고리즘 2024.10.25
[알고리즘] 백준 19698 - 헛간 청약 (C++) [문제 링크] : https://www.acmicpc.net/problem/19698#include using namespace std;int main(){ int N, W, H, L; cin >> N >> W >> H >> L; cout 알고리즘 2024.10.24
[알고리즘] 백준 6996 - 애너그램 (C++) [문제 링크] : https://www.acmicpc.net/problem/6996#include #include using namespace std;int main(){ int T; string a, b, tmp1, tmp2; cin >> T; for(int i=0; i> a >> b; tmp1 = a, tmp2 = b; sort(a.begin(), a.end()); sort(b.begin(), b.end()); if(a == b){ cout 알고리즘 2024.10.23
[알고리즘] 백준 4562 - No Brainer (C++) [문제 링크] : https://www.acmicpc.net/problem/4562#include using namespace std;int main(){ int N; cin >> N; int a, b; for(int i=0; i> a >> b; if(a 알고리즘 2024.10.22
[알고리즘] 백준 2526 - 싸이클 (C++) [문제 링크] : https://www.acmicpc.net/problem/2526#include using namespace std;int N, P, tmp, cnt=1;int Arr[1001]; int main(){ cin >> N >> P; tmp = N; while(!Arr[tmp]){ Arr[tmp] = cnt++; tmp = tmp * N % P; } cout 알고리즘 2024.10.21