• + 0 comments
    const lines = input.split('\n');
        const n = parseInt(lines[0], 10);
    
        for (let i = 1; i <= n; i++) {
            let evenStr = "";
            let oddStr = "";
            for (j = 0; j <= lines[i].length - 1; j++) {
                if (j % 2 === 0) {
                    evenStr = evenStr + lines[i][j]
                } else {
                    oddStr = oddStr + lines[i][j]
                }
            }
            console.log(evenStr,oddStr)
        }