[Algorithm] BOJ2742 - 기찍 N
목차
1. 환경
Editor: Microsoft Visual Studio Code
Compiler: C++20
2. 문제
3. 접근법
알고리즘 분류
- 구현
BOJ2741 - N 찍기의 for
문을 약간 건드려주면 되는 문제.
4. Library
bits/stdc++.h
- Link2
(GNU C++ Standard Library Header - X)
(GCC Compiler Header - O)
5. Code
#include <bits/stdc++.h>
using namespace std;
int N;
void input();
void func();
void output();
int main(void)
{
input();
func();
output();
}
void input()
{
cin >> N;
}
void func()
{
}
void output()
{
for(int i = N; i >= 1; i--)
cout << i << '\n';
}
6. 정리
출력 조건을 잘 확인하자.
7. Link
1. BOJ2742 - 기찍 N
https://www.acmicpc.net/problem/2742
2. bits/stdc++.h
https://gcc.gnu.org/onlinedocs/gcc-4.8.0/libstdc++/api/a01541_source.html
3. Cplusplus.com
https://www.cplusplus.com/reference/