Sei
Moderation Admin
|
|
Trisphee Coding Contest!
|
#1
|
|
Welcome, welcome.
As we brainstormed contests for this event, we realized that we wanted to have a few different contests. We realized that very few events had ever had a coding contest, so we thought we'd give those who have some coding experience a chance to win some prizes. All you need to do is:
The function "Special($n)" will return the user ID of the username passed as its parameter.
Code:
$p = "Coda and Lucid and Ashy and Fenris okay";
$l = chr(32);
$o = array();
$z = Special("Inari");
$w = $p[42];
for($i = 0; $i < 24; $i++) {
if($p[$i] == $l) {
if($w == "and") {
echo $i;
} else {
$o[] = $z . $w;
$z = Special($w);
}
$w = $l[$i];
} else {
$w = $w . $p[$i];
}
}
echo chr(13) . chr(10);
foreach($o as $k) {
echo $k;
echo chr(13) . chr(10);
}
Find out what the code outputs at the end. When you think you have the answer, please send me a PM. When people solve this first one, more codes can be released!
As for prizes, those who answer correctly will receive: - 1st Place - 40 Runes, 7,000 Aurum
- 2nd Place - 20 Runes, 5,000 Aurum
- 3rd Place - 3,000 Aurum
Last edited by Sei; 04-16-2011 at 02:04 AM.
|
|
Posted 04-15-2011, 02:35 PM
|
|
|