GUVI
Back

facing some issues in codekata private test cases

Created 3 years ago
16 Views
1 Comments
Vishwaradhya
@Vishwaradhya
Vishwaradhya
@VishwaradhyaProfile is locked. Login

Facing issues in private test cases the below code when compiled in IDE gives correct output but when done in codekata is not showing output.

const readline = require('readline');

const inp = readline.createInterface({

input: process.stdin

});

const userInput = [];

inp.on("line", (data) => {

userInput.push(data);

});

inp.on("close", () => {

let A = userInput[0];

let N = userInput[1];

for(i=0;i<N;i++)

{

console.log(A)

}

});

i/p

10

5

o/p

10
10
10
10
10

Comments
Please login to comment.
 
Powered by habitate.io Habitate