Algorithm/๋ฌธ์ ํ์ด
[๋ฐฑ์ค] 9316๋ฒ - Hello Judge (JS)
moaoh
2023. 7. 22. 23:59
9316๋ฒ: Hello Judge
ํ ์ค์ ํ๋์ Hello World, Judge i! ๋ฅผ ์ถ๋ ฅํ๋ค.
www.acmicpc.net
๋ฌธ์
๋น์ ์ N๊ฐ์ ํ ์คํธ์ผ์ด์ค๋ค์๊ฒ ๋ฐ๋์ ์ธ์ฌ๋ฅผ ํด์ผ ์ด ๋ฌธ์ ๋ฅผ ํ ์ ์๋ค.
N๊ฐ์ ์ค์ ๊ฑธ์ณ
"Hello World, Judge i!"
๋ฅผ ์ถ๋ ฅํ๋ ํ๋ก๊ทธ๋จ์ ๋ง๋ค๋ผ. ์ฌ๊ธฐ์ i๋ ์ค์ ๋ฒํธ์ด๋ค.
์ ๋ ฅ
N์ด ์ฃผ์ด์ง๋ค. (1 ≤ N ≤ 200)
์ถ๋ ฅ
ํ ์ค์ ํ๋์ Hello World, Judge i! ๋ฅผ ์ถ๋ ฅํ๋ค.
ํ์ด๊ณผ์
code
const hello = () => {
const n = require('fs')
.readFileSync('/dev/stdin')
.toString()
.trim()
.split('\n')
.map(Number);
for (let i = 1; i <= n; i++) {
console.log(`Hello World, Judge ${i}!`);
}
};
hello();