Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <?php
- $input = explode(", ", readline());
- $max = -2147483647;
- $min = 2147483647;
- for ($i = 0; $i < $input[0]; $i++) {
- $arr = explode(", ", readline());
- $maxTmp = max($arr);
- $max = max($maxTmp, $max);
- $minTmp = min($arr);
- $min = min($minTmp, $min);
- }
- echo "Min: $min\n";
- echo "Max: $max";
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement