• + 0 comments

    for javascript function processData(input) { //Enter your code here var loopNum=input.split("\n")[0];

    var inpuJump=1;
    for(var i=0;i<loopNum;i++){
        var arrSize=parseInt(input.split("\n")[inpuJump]);
        var arr=input.split("\n")[inpuJump+1].split(" ");
    
        var sumArr=0;
        for(var j=0;j<arrSize;j++){
            sumArr+=(parseInt(arrSize)+1)/((parseInt(getLarger(arr,arr[j])))+1);
        }
     console.log(sumArr.toFixed(2));   
    
        inpuJump+=2;
    }
    
    function getLarger(arrt,curr){
        var count=0;
        for(var i=0;i<arrSize;i++){
            if(parseInt(arrt[i])>=curr) count++;
        }
        return count;
    }
    

    }