//M为最大值,P为你说的1/2/5function getnum(M,p){
var i = Math.ceil(M/8)
if(i%p == 0)
{
return i;
}
else
{
i++;
}
}