Help me in solving CHFRICH problem

My issue

I’m getting the right answers, could you guys help me to see what is wrong?

My code

// your code goes here
process.stdin.resume()
process.stdin.setEncoding('utf-8')
let data=''
process.stdin.on('data',(input)=>{
    data = input.split('\n')
})

process.stdin.on('end',()=>{
    let i=0
    const numberTest = data.shift()
    let finalData = data.map((d)=> d.split(' '))
    while(i<numberTest){
     console.log(yearsToBecome(...finalData[i]) )
        i++
    }
})

function yearsToBecome(A,B,X){
    return (B - A)/X
}

Learning course: Level up from 1* to 2*
Problem Link: CodeChef: Practical coding for everyone

Any updates?

Still waiting

@leonar6
plzz refer the following solution for debugging your code.

process.stdin.resume();
process.stdin.setEncoding('utf8');

let inputStdin = "";

process.stdin.on('data', function (data) {
    inputStdin += data;
});

process.stdin.on('end', function () {
    start();    
});

function start() {
    let inputArr = inputStdin.split('\n')
    let T = inputArr[0]
    inputArr.shift()
    let N = inputArr
    
    for (let i = 0; i < T; i++) {
        let elementArray = N[i].split(' ')
        console.log((elementArray[1]-elementArray[0])/elementArray[2])
    }
}