# [Algorithm/JS] ๋ฐฑ์ค€ 10950๋ฒˆ ๊ธฐ์ฐ N

๐Ÿ”— ๋ฌธ์ œ ๋ฐ”๋กœ๊ฐ€๊ธฐ (opens new window)

# Question

์ž์—ฐ์ˆ˜ N์ด ์ฃผ์–ด์กŒ์„ ๋•Œ, 1๋ถ€ํ„ฐ N๊นŒ์ง€ ํ•œ ์ค„์— ํ•˜๋‚˜์”ฉ ์ถœ๋ ฅํ•˜๋Š” ํ”„๋กœ๊ทธ๋žจ์„ ์ž‘์„ฑํ•˜์‹œ์˜ค.

# Input

์ฒซ์งธ ์ค„์— 100,000๋ณด๋‹ค ์ž‘๊ฑฐ๋‚˜ ๊ฐ™์€ ์ž์—ฐ์ˆ˜ N์ด ์ฃผ์–ด์ง„๋‹ค.

# Output

์ฒซ์งธ ์ค„๋ถ€ํ„ฐ N๋ฒˆ์งธ ์ค„ ๊นŒ์ง€ ์ฐจ๋ก€๋Œ€๋กœ ์ถœ๋ ฅํ•œ๋‹ค.

# Example

# Input

5
1

# Output

5
4
3
2
1
1
2
3
4
5

# Solution

const input = require('fs').readFileSync('dev/stdin').toString();
let answer = '';
for (let i = Number(input); i > 0; i--) {
  answer += i + '\n';
}
console.log(answer);
1
2
3
4
5
6
Last Updated: 2022. 6. 5. ์˜คํ›„ 3:42:39