RosettaCodeData/Task/Modular-arithmetic/Perl/modular-arithmetic.pl
2023-07-01 13:44:08 -04:00

3 lines
90 B
Perl

use Math::ModInt qw(mod);
sub f { my $x = shift; $x**100 + $x + 1 };
print f mod(10, 13);