Skip to content

Learning path · Programming Foundations with Python

Back to lesson · Recursion

카운트다운 한 줄로 출력하기

Unrated
한국어

Language

Contribute a translation
Time limit
1000 ms
Memory limit
256 MB
Submissions
0
Correct
0
Solved by
0
AC rate

Statement

전역 변수에 저장된 값을 참조하여 그 값부터 1까지 스페이스를 사이에 두고 한 줄로 출력하는 함수 g()를 재귀 함수로 설계하시오.

Input

첫째 줄에 정수 $n$이 주어진다. ($1 \le n \le 100$)

Output

$n$부터 1까지의 정수를 공백을 사이에 두고 한 줄에 출력한다.

Examples

Sample input 1
5
Sample output 1
5 4 3 2 1
Sample input 2
1
Sample output 2
1

Tags

No tags yet