function min(arr){ var count = arr[5] + arr[4] + arr[3] + Math.ceil(arr[2]/4); var n =arr[0]+arr[1]*4+arr[2]*9+arr[3]*16+arr[4]*25+arr[5]*36; arr[1] = arr[1] - 5*arr[3]; if(arr[2]%4 == 1){ arr[1] = arr[1] - (arr[2]%4)*5; }else if(arr[2...