Programming/Python & Data Structures
[Baekjoon/Python3/C] 2742번 기찍 N
HooNeee
2020. 12. 4. 09:22
[Baekjoon/Python3/C] 2742번 기찍 N
https://www.acmicpc.net/problem/2742
2742번: 기찍 N
자연수 N이 주어졌을 때, N부터 1까지 한 줄에 하나씩 출력하는 프로그램을 작성하시오.
www.acmicpc.net
[Python3]
N = int(input())
for i in range(N):
print(N - i)
[C]
#include <stdio.h>
int main() {
int N;
scanf("%d", &N);
for (int i = N; i >= 1; i--)
printf("%d\n", i);
}