in reply to Re^4: Input data problem
in thread Input data problem

Integer has an upper limit. Perl automatically converts to float if integer cannot be used. I was able to get the desired output with bigint:
#!/usr/bin/perl use warnings; use strict; my ($n, $m, $i) = split ' ', <>; my $ma = $m / $i; my $na = $n / $i; $ma = int($ma) + 1 if int $ma != $ma; $na = int($na) + 1 if int $na != $na; use bigint; my $x = int($ma * $na); print 0 + $x, "\n";
لսႽ† ᥲᥒ⚪⟊Ⴙᘓᖇ Ꮅᘓᖇ⎱ Ⴙᥲ𝇋ƙᘓᖇ