You are viewing a single comment's thread. Return to all comments →
brilliant, thank you
php solution
<?php $handle = fopen("php://stdin", "r"); fscanf($handle, "%d", $n); for ($i=0; $i < $n; $i++) { fscanf($handle, "%d %d", $b, $e); echo floor(sqrt($e)) - ceil(sqrt($b)) + 1 . "\n"; }
Seems like cookies are disabled on this browser, please enable them to open this website
Sherlock and Squares
You are viewing a single comment's thread. Return to all comments →
brilliant, thank you
php solution