codingtests/CodeChef/easy/HS08TEST/solve.php
2011-04-10 13:19:21 +02:00

13 lines
203 B
PHP

<?php
while($s=explode(' ',trim(fgets(STDIN)))) {
if($s[1]%5) {
echo $s[1];
} else {
$new = round($s[1]-$s[1]-0.5,2);
if($new)
echo $new;
else
echo $s[1];
}
}