use utf8; use strict; use warnings; my $t = <>; while ($t--) { print int(sqrt(<>)), "\n"; }