# |
Author |
Problem |
Lang |
Verdict |
Time |
Memory |
Sent |
Judged |
|
113388721 |
Practice:
ExeW |
486A
- 24
|
PHP
|
Wrong answer on test 5
|
31 ms
|
8 KB
|
2021-04-18 10:19:48 |
2021-04-18 10:19:48 |
|
<?php
$n = trim(fgets(STDIN));
$result = 0;
if($n%2 == 0){
$result = $n / 2;
}else{
$result = (($n-1) / 2) - $n;
}
echo number_format($result,0,null,"");
?>
Click to see test details