// /dev/stdin
5
5 50 50 70 80 100
7 100 95 90 80 70 60 50
3 70 90 80
3 70 90 81
9 100 99 98 97 96 95 94 93 91
// index.js
console.log(fs.readFileSync('dev/stdin').toString());
console.log(fs.readFileSync('dev/stdin').toString().split(' ');
console.log(fs.readFileSync('dev/stdin').toString().split('\n');
'5\n5 50 50 70 80 100\n7 100 95 90 80 70 60 50\n3 70 90 80\n3 70 90 81\n9 100 99 98 97 96 95 94 93 91'
[
'5\n5', '50', '50',
'70', '80', '100\n7',
'100', '95', '90',
'80', '70', '60',
'50\n3', '70', '90',
'80\n3', '70', '90',
'81\n9', '100', '99',
'98', '97', '96',
'95', '94', '93',
'91'
]
[
'5',
'5 50 50 70 80 100',
'7 100 95 90 80 70 60 50',
'3 70 90 80',
'3 70 90 81',
'9 100 99 98 97 96 95 94 93 91'
]

qkrehdwns032 2년 전
dev/stdin 으로 하는게 틀린건가요?