Bueno este es mi script absurdo para concursar (no intenten razonar porque lo hice así, la explicación es absurda):
Código PHP:
Ver original<?php
class Absurd_PHP_Script {
private static $newton_polynomial_coefficients = [
5.8235623178341E-22,
-9.3851993477945E-21,
1.4235914986936E-19,
-2.038642962346E-18,
2.7600750090034E-17,
-3.5331725311503E-16,
4.2715655074561E-15,
-4.8654708710136E-14,
5.1999299427112E-13,
-5.1818659188203E-12,
4.7714876969912E-11,
-4.0085929343735E-10,
3.0190412007201E-9,
-1.9875791050146E-8,
1.0979568271235E-7,
-4.6618257183733E-7,
1.0661599203266E-6,
4.7411115119448E-6,
-8.7456910373577E-5,
0.00081983024691358,
-0.0063712522045855,
0.043353174603175,
-0.25039682539683,
1.1625,
-4.0083333333333,
8.7916666666667,
-7.1666666666667,
-11.5,
20,
84
];
public static function interpolate($x) {
$count = count(self::$newton_polynomial_coefficients); foreach(self::$newton_polynomial_coefficients as $nro => $coefficient)
$y_of_x = ($nro === 0 ? $coefficient : ($y_of_x * ($x - ($count-$nro)))+$coefficient);
}
}
?>
<!DOCTYPE html>
<html>
<head>
<title>Another Absurd PHP Script</title>
<meta charset="UTF-8">
<meta name="application-name" content="Absurd PHP Script">
<meta name="author" content="NSD">
<style>
body {
background-color: #ecf0f1;
font-family: arial;
}
form {
width: 800px;
margin: 0 auto;
border: 1px solid #bdc3c7;
padding: 50px 10px;
background: #fff;
}
label {
margin: 10px auto;
text-align: center;
display: block;
text-transform: uppercase;
}
select {
margin: 0 auto;
width: 600px;
display: block;
height: 40px;
}
input {
display: block;
background: #3498db;
border: none;
padding: 20px 100px;
margin: 10px auto;
color: #fff;
text-transform: uppercase;
font-weight: bold;
letter-spacing: 2px;
font-size: 16px;
}
div {
text-align: center;
}
</style>
</head>
<body>
<form method="post" action="#">
<label>Mode:</label>
<select name="level">
<option value="22">Basic</option>
<option value="31">Full</option>
<option value="60">Insane</option>
</select>
<input type="submit" value="SHOW ME ANYTHING ABSURD">
<?php
if(!empty($_POST["level"])) {
echo "<div>";
for($nro=1; $nro<$_POST["level"]; $nro++)
echo chr(Absurd_PHP_Script
::interpolate($nro)); echo "</div>";
}
?>
</form>
</body>
</html>