模拟一javascript--好多鱼
readline = require('readline');
rl = readline.createInterface({
input: process.stdin,
output: process.stdout
});
var arrParams = [];
var index=0;
rl.on('line',function(line){
//获取第一行
if(index%3==0){
arrParams[0]=line.split(" ")[0];
arrParams[1]=line.split(" ")[1];
}
//获取第二行
if(index%3==1){
arrParams[2]=line.split(" ")[0];
}
//获取第三行
if(index%3==2){
var fishSize=[];
fishSize=line.split(" ");
console.log(num(parseInt(arrParams[0]),parseInt(arrParams[1]),parseInt(arrParams[2]),fishSize));
arrParams = [];
}
index++;
});
function num(min,max,n,fishSize){
var cout=0;
for(var i=0;i<(max-min+1);i++){
var value = min+i;
var flag = 1;
for(var j=0;j<n;j++){
if((parseInt(fishSize[j])>=2*value&&parseInt(fishSize[j])<=10*value)||(2*parseInt(fishSize[j])<=value&&(10*parseInt(fishSize[j]))>=value)){
flag =0;
}
}
if(flag){
cout++;
}
};
return cout;
}