ShangNing.net

Archive for July, 2010

A curious phenomenon in PHP language

Today’s afternoon, I wrote an aimless code of PHP, that’s a good way to waste time I think. Then I created a simple line, and I assume the codes was wrong. But when I run the code, its outputĀ  amazes me. The simple codes is:
<?php
print 1…1;
?>
The output is “10.1″, I have in mind some doubts [...]

Monday, July 5th, 2010

Number Games

Its raining outside and Alfonso and Bernadette are bored.
Alfonso suggests the following games:
(a) Two players alternatively erase some 9 numbers from the sequence 1,2,…,101 until only two remain. The player that starts wins x?54 dollars from the player that plays second. Here x is the difference between the remaining two numbers. Would you rather be [...]

Saturday, July 3rd, 2010