๐Ÿค ์€์ง€log ๐Ÿค

[ํ”„๋กœ๊ทธ๋ž˜๋จธ์Šค:Javascript] ๋ฌธ์ž์—ด ์ถœ๋ ฅํ•˜๊ธฐ ๋ณธ๋ฌธ

๐ŸŒˆ ํ”„๋กœ๊ทธ๋ž˜๋จธ์Šค

[ํ”„๋กœ๊ทธ๋ž˜๋จธ์Šค:Javascript] ๋ฌธ์ž์—ด ์ถœ๋ ฅํ•˜๊ธฐ

Eun_zii 2024. 4. 11. 16:11

ํ”„๋กœ๊ทธ๋ž˜๋จธ์Šค Lv.0

- ๋ฌธ์ž์—ด ์ถœ๋ ฅํ•˜๊ธฐ

 

๐Ÿ’š ๋ฌธ์ œ์„ค๋ช…

 

๐Ÿ’š ์ œํ•œ์กฐ๊ฑด

  • 1 ≤ str์˜ ๊ธธ์ด ≤ 1,000,000
  • str์—๋Š” ๊ณต๋ฐฑ์ด ์—†์œผ๋ฉฐ, ์ฒซ์งธ ์ค„์— ํ•œ ์ค„๋กœ๋งŒ ์ฃผ์–ด์ง‘๋‹ˆ๋‹ค.

๐Ÿ’š ํ’€์ด

const readline = require('readline');
const rl = readline.createInterface({
    input: process.stdin,
    output: process.stdout
});

let input = [];

rl.on('line', function (line) {
    input = [line];
}).on('close',function(){
    str = input[0];
    console.log(str)
});

 

โœ… 

console.log(str) ๋กœ ๋ฌธ์ž์—ด์„ ์ถœ๋ ฅ ํ•ด์ค€๋‹ค.

 

728x90