[백준 13909번] 창문 닫기 (C++)
문제링크 : https://www.acmicpc.net/problem/13909#include using namespace std;typedef long long ll;int N;int main(void){ ios_base::sync_with_stdio(false); cin.tie(0); cin >> N; cout 직접 경우의 수를 체크해보면 규칙이 보인다.n=3 -> 11 1 11 0 11 0 0n=4 -> 21 1 1 11 0 1 01 0 0 01 0 0 1n=5 -> 21 1 1 1 11 0 1 0 11 0 0 0 11 0 0 1 11 0 0 1 0n=6 -> 21 1 1 1 1 11 0 1 0 1 01 0 0 0 1 11 0 0 1 1 11 0 0 1 0 11 0 0 1 0..
백준/실버
2025. 3. 30. 19:14
[백준 13241]번 최소공배수 (C++)
문제링크 : https://www.acmicpc.net/problem/13241#include using namespace std;typedef long long ll;ll A, B;int main(void){ ios_base::sync_with_stdio(false); cin.tie(0); cin >> A >> B; cout 간단한 최소공배수 구하는 문제이다.다만 최소공배수의 값이 커지는 것을 대비해 자료형을 int가 아닌 long long int를 사용하는 것에만 주의하면 된다.
백준/실버
2025. 3. 30. 03:28