15 lines
259 B
PHP
15 lines
259 B
PHP
<?php
|
|
|
|
$numbers = array_map('intval', explode("\n", file_get_contents('input.txt')));
|
|
|
|
$current = array_shift($numbers);
|
|
$count = 0;
|
|
foreach ($numbers as $number) {
|
|
if ($number > $current) {
|
|
$count++;
|
|
}
|
|
|
|
$current = $number;
|
|
}
|
|
|
|
echo $count; |