Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- x = c(S) = Count(S)
- y = m(S) = Min(S[0]/A, S[1]/A, ..., S[n]/A)
- $x = count($s);
- $y = min($s) / (array_sum($s) / count($s));
- function avg($values) {
- $values = is_array($values) ? $values : func_get_args();
- return array_sum($values) / count($values);
- }
- $x = count($s);
- $y = min($s) / avg($s);
- $values = [];
- $p = [1, 5, 3, 6, 4];
- for ($i = 1; $i <= count($p); $i++) {
- $s = array_slice($p, 0, $i);
- $x = count($s);
- $y = min($s) / avg($s);
- $values[] = compact('x', 'y');
- }
- print_r($values);
Add Comment
Please, Sign In to add comment