diff options
| author | CY Fung <fungcheokyin@gmail.com> | 2022-06-18 17:53:18 +0800 |
|---|---|---|
| committer | CY Fung <fungcheokyin@gmail.com> | 2022-06-18 17:53:18 +0800 |
| commit | d70c75981e688be5a8052024a98e88e9db6573bf (patch) | |
| tree | 7425eeb8d93f1cdfb226eab79e37702117f2647b | |
| parent | 33428b579ff86e407a15dcdb56694a7d102a0d30 (diff) | |
| download | perlweeklychallenge-club-d70c75981e688be5a8052024a98e88e9db6573bf.tar.gz perlweeklychallenge-club-d70c75981e688be5a8052024a98e88e9db6573bf.tar.bz2 perlweeklychallenge-club-d70c75981e688be5a8052024a98e88e9db6573bf.zip | |
Task 1 improvements
| -rw-r--r-- | challenge-169/cheok-yin-fung/perl/ch-1.pl | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/challenge-169/cheok-yin-fung/perl/ch-1.pl b/challenge-169/cheok-yin-fung/perl/ch-1.pl index ce4ccc7b79..35de02700c 100644 --- a/challenge-169/cheok-yin-fung/perl/ch-1.pl +++ b/challenge-169/cheok-yin-fung/perl/ch-1.pl @@ -13,7 +13,7 @@ die "You're asking too many, or I am too little!\n" if $req > 241; # 21*20/2 + 21 + 4*3/2 + 4 -my $pt = 24; +my $pt = ceil( ( sqrt(8*$req-79) +7 )/2 ) - 1; my @brilliant = (-1, 4, 6, 9, 10, 14, 15, 21, 25, 35, 49); |
