diff options
| author | Mohammad Sajid Anwar <mohammad.anwar@yahoo.com> | 2025-08-02 23:21:53 +0100 |
|---|---|---|
| committer | Mohammad Sajid Anwar <mohammad.anwar@yahoo.com> | 2025-08-02 23:21:53 +0100 |
| commit | d904375e9cf226c2c0465204e98b35fadf52be91 (patch) | |
| tree | 94c1a7ca113992f9ce1d120cfd2f7f328f569a2a | |
| parent | 7d481b3b5c0f0a77da0c975ef42b0c47865ebce0 (diff) | |
| download | perlweeklychallenge-club-d904375e9cf226c2c0465204e98b35fadf52be91.tar.gz perlweeklychallenge-club-d904375e9cf226c2c0465204e98b35fadf52be91.tar.bz2 perlweeklychallenge-club-d904375e9cf226c2c0465204e98b35fadf52be91.zip | |
- Added solutions by Solathian.
25 files changed, 46 insertions, 97 deletions
diff --git a/challenge-250/solathian/ch-1.pl b/challenge-250/solathian/ch-1.pl deleted file mode 100644 index 229535f1b1..0000000000 --- a/challenge-250/solathian/ch-1.pl +++ /dev/null @@ -1,31 +0,0 @@ -#!usr/bin/perl -use v5.38; -use builtin qw(indexed); -no warnings "experimental"; - - -# Challenge 250 - 1 - Smallest Index -# You are given an array of integers, @ints. -# Write a script to find the smallest index i such that i mod 10 == $ints[i] otherwise return -1. - - -small(0,1,2); # 0 -small(4, 3, 2, 1); # 2 -small(1, 2, 3, 4, 5, 6, 7, 8, 9, 0); # -1 - -sub small(@array) -{ - my $returnVal = -1; - - foreach my ($index, $elem) (indexed @array) - { - if($index % 10 == $elem) - { - $returnVal = $index; - last; - } - } - - say $returnVal; - return $returnVal; -}
\ No newline at end of file diff --git a/challenge-250/solathian/ch-2.pl b/challenge-250/solathian/ch-2.pl deleted file mode 100644 index 052fffe081..0000000000 --- a/challenge-250/solathian/ch-2.pl +++ /dev/null @@ -1,35 +0,0 @@ -#!usr/bin/perl -use v5.38; - -# Challenge 250 - 2 - Alphanumeric String Value -# You are given an array of alphanumeric strings. -# Write a script to return the maximum value of alphanumeric string in the given array. -# The value of alphanumeric string can be defined as - -# a) The numeric representation of the string in base 10 if it is made up of digits only. -# b) otherwise the length of the string - - -asv("perl", "2", "000", "python", "r4ku"); -asv("001", "1", "000", "0007"); - - -sub asv(@list) -{ - my $max = 0; - - foreach my $elem (@list) - { - # if it only has numbers - if($elem =~ m"^\d+$") - { - $max = eval $elem if( $elem > $max ); - } - else - { - $max = length $elem if( length $elem > $max ); - } - } - - say $max; -}
\ No newline at end of file diff --git a/stats/pwc-current.json b/stats/pwc-current.json index 03873a8d8e..bef376de1e 100644 --- a/stats/pwc-current.json +++ b/stats/pwc-current.json @@ -265,6 +265,16 @@ [ "Perl", 2 + ] + ], + "id" : "Solathian", + "name" : "Solathian" + }, + { + "data" : [ + [ + "Perl", + 2 ], [ "Blog", @@ -431,6 +441,11 @@ "y" : 2 }, { + "drilldown" : "Solathian", + "name" : "Solathian", + "y" : 2 + }, + { "drilldown" : "Thomas Kohler", "name" : "Thomas Kohler", "y" : 4 @@ -455,7 +470,7 @@ } ], "subtitle" : { - "text" : "[Champions: 24] Last updated at 2025-08-01 21:00:14 GMT" + "text" : "[Champions: 25] Last updated at 2025-08-02 22:21:42 GMT" }, "title" : { "text" : "The Weekly Challenge - 332" diff --git a/stats/pwc-language-breakdown-2019.json b/stats/pwc-language-breakdown-2019.json index ac3a52d708..f1d8e691a3 100644 --- a/stats/pwc-language-breakdown-2019.json +++ b/stats/pwc-language-breakdown-2019.json @@ -970,7 +970,7 @@ } ], "subtitle" : { - "text" : "Click the columns to drilldown the language breakdown. Last updated at 2025-08-01 21:00:14 GMT" + "text" : "Click the columns to drilldown the language breakdown. Last updated at 2025-08-02 22:21:42 GMT" }, "title" : { "text" : "The Weekly Challenge Language" diff --git a/stats/pwc-language-breakdown-2020.json b/stats/pwc-language-breakdown-2020.json index 2626f3c54f..f7fdfd90de 100644 --- a/stats/pwc-language-breakdown-2020.json +++ b/stats/pwc-language-breakdown-2020.json @@ -1223,7 +1223,7 @@ } ], "subtitle" : { - "text" : "Click the columns to drilldown the language breakdown. Last updated at 2025-08-01 21:00:14 GMT" + "text" : "Click the columns to drilldown the language breakdown. Last updated at 2025-08-02 22:21:42 GMT" }, "title" : { "text" : "The Weekly Challenge Language" diff --git a/stats/pwc-language-breakdown-2021.json b/stats/pwc-language-breakdown-2021.json index 248e7d166b..fa9aa3c09a 100644 --- a/stats/pwc-language-breakdown-2021.json +++ b/stats/pwc-language-breakdown-2021.json @@ -1223,7 +1223,7 @@ } ], "subtitle" : { - "text" : "Click the columns to drilldown the language breakdown. Last updated at 2025-08-01 21:00:14 GMT" + "text" : "Click the columns to drilldown the language breakdown. Last updated at 2025-08-02 22:21:42 GMT" }, "title" : { "text" : "The Weekly Challenge Language" diff --git a/stats/pwc-language-breakdown-2022.json b/stats/pwc-language-breakdown-2022.json index 33f9904690..e44b392e1c 100644 --- a/stats/pwc-language-breakdown-2022.json +++ b/stats/pwc-language-breakdown-2022.json @@ -1223,7 +1223,7 @@ } ], "subtitle" : { - "text" : "Click the columns to drilldown the language breakdown. Last updated at 2025-08-01 21:00:14 GMT" + "text" : "Click the columns to drilldown the language breakdown. Last updated at 2025-08-02 22:21:42 GMT" }, "title" : { "text" : "The Weekly Challenge Language" diff --git a/stats/pwc-language-breakdown-2023.json b/stats/pwc-language-breakdown-2023.json index 3668573e21..3be497a7a6 100644 --- a/stats/pwc-language-breakdown-2023.json +++ b/stats/pwc-language-breakdown-2023.json @@ -1200,7 +1200,7 @@ } ], "subtitle" : { - "text" : "Click the columns to drilldown the language breakdown. Last updated at 2025-08-01 21:00:14 GMT" + "text" : "Click the columns to drilldown the language breakdown. Last updated at 2025-08-02 22:21:42 GMT" }, "title" : { "text" : "The Weekly Challenge Language" diff --git a/stats/pwc-language-breakdown-2024.json b/stats/pwc-language-breakdown-2024.json index c66dc80662..887e0dca15 100644 --- a/stats/pwc-language-breakdown-2024.json +++ b/stats/pwc-language-breakdown-2024.json @@ -1246,7 +1246,7 @@ } ], "subtitle" : { - "text" : "Click the columns to drilldown the language breakdown. Last updated at 2025-08-01 21:00:14 GMT" + "text" : "Click the columns to drilldown the language breakdown. Last updated at 2025-08-02 22:21:42 GMT" }, "title" : { "text" : "The Weekly Challenge Language" diff --git a/stats/pwc-language-breakdown-2025.json b/stats/pwc-language-breakdown-2025.json index ed84b1741a..7aa410aa50 100644 --- a/stats/pwc-language-breakdown-2025.json +++ b/stats/pwc-language-breakdown-2025.json @@ -8,7 +8,7 @@ "data" : [ [ "Perl", - 36 + 38 ], [ "Raku", @@ -565,7 +565,7 @@ { "drilldown" : "332", "name" : "332", - "y" : 80 + "y" : 82 }, { "drilldown" : "331", @@ -717,7 +717,7 @@ } ], "subtitle" : { - "text" : "Click the columns to drilldown the language breakdown. Last updated at 2025-08-01 21:00:14 GMT" + "text" : "Click the columns to drilldown the language breakdown. Last updated at 2025-08-02 22:21:42 GMT" }, "title" : { "text" : "The Weekly Challenge Language" diff --git a/stats/pwc-language-breakdown-summary.json b/stats/pwc-language-breakdown-summary.json index 5b17477157..47be5ea159 100644 --- a/stats/pwc-language-breakdown-summary.json +++ b/stats/pwc-language-breakdown-summary.json @@ -10,7 +10,7 @@ "data" : [ [ "Perl", - 17142 + 17144 ], [ "Raku", @@ -37,7 +37,7 @@ } ], "subtitle" : { - "text" : "Last updated at 2025-08-01 21:00:14 GMT" + "text" : "Last updated at 2025-08-02 22:21:42 GMT" }, "title" : { "text" : "The Weekly Challenge Contributions [2019 - 2025]" diff --git a/stats/pwc-leaders.json b/stats/pwc-leaders.json index 5944820982..5359730b48 100644 --- a/stats/pwc-leaders.json +++ b/stats/pwc-leaders.json @@ -1049,7 +1049,7 @@ } ], "subtitle" : { - "text" : "Click the columns to drilldown the score breakdown. Last updated at 2025-08-01 21:00:14 GMT" + "text" : "Click the columns to drilldown the score breakdown. Last updated at 2025-08-02 22:21:42 GMT" }, "title" : { "text" : "Team Leaders (TOP 50)" diff --git a/stats/pwc-summary-1-30.json b/stats/pwc-summary-1-30.json index 73a73bb4a3..08dfabd499 100644 --- a/stats/pwc-summary-1-30.json +++ b/stats/pwc-summary-1-30.json @@ -115,7 +115,7 @@ } ], "subtitle" : { - "text" : "[Champions: 30] Last updated at 2025-08-01 21:00:14 GMT" + "text" : "[Champions: 30] Last updated at 2025-08-02 22:21:42 GMT" }, "title" : { "text" : "The Weekly Challenge [2019 - 2025]" diff --git a/stats/pwc-summary-121-150.json b/stats/pwc-summary-121-150.json index d34141990c..c67a1fde12 100644 --- a/stats/pwc-summary-121-150.json +++ b/stats/pwc-summary-121-150.json @@ -115,7 +115,7 @@ } ], "subtitle" : { - "text" : "[Champions: 30] Last updated at 2025-08-01 21:00:14 GMT" + "text" : "[Champions: 30] Last updated at 2025-08-02 22:21:42 GMT" }, "title" : { "text" : "The Weekly Challenge [2019 - 2025]" diff --git a/stats/pwc-summary-151-180.json b/stats/pwc-summary-151-180.json index 97f0337552..cc35a8d518 100644 --- a/stats/pwc-summary-151-180.json +++ b/stats/pwc-summary-151-180.json @@ -115,7 +115,7 @@ } ], "subtitle" : { - "text" : "[Champions: 30] Last updated at 2025-08-01 21:00:14 GMT" + "text" : "[Champions: 30] Last updated at 2025-08-02 22:21:42 GMT" }, "title" : { "text" : "The Weekly Challenge [2019 - 2025]" diff --git a/stats/pwc-summary-181-210.json b/stats/pwc-summary-181-210.json index 65d9cc7137..589ef4edb6 100644 --- a/stats/pwc-summary-181-210.json +++ b/stats/pwc-summary-181-210.json @@ -115,7 +115,7 @@ } ], "subtitle" : { - "text" : "[Champions: 30] Last updated at 2025-08-01 21:00:14 GMT" + "text" : "[Champions: 30] Last updated at 2025-08-02 22:21:42 GMT" }, "title" : { "text" : "The Weekly Challenge [2019 - 2025]" diff --git a/stats/pwc-summary-211-240.json b/stats/pwc-summary-211-240.json index 6baf5e9585..ce4046cc42 100644 --- a/stats/pwc-summary-211-240.json +++ b/stats/pwc-summary-211-240.json @@ -115,7 +115,7 @@ } ], "subtitle" : { - "text" : "[Champions: 30] Last updated at 2025-08-01 21:00:14 GMT" + "text" : "[Champions: 30] Last updated at 2025-08-02 22:21:42 GMT" }, "title" : { "text" : "The Weekly Challenge [2019 - 2025]" diff --git a/stats/pwc-summary-241-270.json b/stats/pwc-summary-241-270.json index 9c2994ade7..83a6c8ed23 100644 --- a/stats/pwc-summary-241-270.json +++ b/stats/pwc-summary-241-270.json @@ -115,7 +115,7 @@ } ], "subtitle" : { - "text" : "[Champions: 30] Last updated at 2025-08-01 21:00:14 GMT" + "text" : "[Champions: 30] Last updated at 2025-08-02 22:21:42 GMT" }, "title" : { "text" : "The Weekly Challenge [2019 - 2025]" diff --git a/stats/pwc-summary-271-300.json b/stats/pwc-summary-271-300.json index 6a9f4cccaf..890f53a19a 100644 --- a/stats/pwc-summary-271-300.json +++ b/stats/pwc-summary-271-300.json @@ -24,7 +24,7 @@ 4, 1, 3, - 96, + 98, 1, 114, 2, @@ -115,7 +115,7 @@ } ], "subtitle" : { - "text" : "[Champions: 30] Last updated at 2025-08-01 21:00:14 GMT" + "text" : "[Champions: 30] Last updated at 2025-08-02 22:21:42 GMT" }, "title" : { "text" : "The Weekly Challenge [2019 - 2025]" diff --git a/stats/pwc-summary-301-330.json b/stats/pwc-summary-301-330.json index f4e9f982bc..2ef28c0ccc 100644 --- a/stats/pwc-summary-301-330.json +++ b/stats/pwc-summary-301-330.json @@ -106,7 +106,7 @@ } ], "subtitle" : { - "text" : "[Champions: 27] Last updated at 2025-08-01 21:00:14 GMT" + "text" : "[Champions: 27] Last updated at 2025-08-02 22:21:42 GMT" }, "title" : { "text" : "The Weekly Challenge [2019 - 2025]" diff --git a/stats/pwc-summary-31-60.json b/stats/pwc-summary-31-60.json index c4abe908b2..5a53534c22 100644 --- a/stats/pwc-summary-31-60.json +++ b/stats/pwc-summary-31-60.json @@ -115,7 +115,7 @@ } ], "subtitle" : { - "text" : "[Champions: 30] Last updated at 2025-08-01 21:00:14 GMT" + "text" : "[Champions: 30] Last updated at 2025-08-02 22:21:42 GMT" }, "title" : { "text" : "The Weekly Challenge [2019 - 2025]" diff --git a/stats/pwc-summary-61-90.json b/stats/pwc-summary-61-90.json index b854897bad..068309c3e5 100644 --- a/stats/pwc-summary-61-90.json +++ b/stats/pwc-summary-61-90.json @@ -115,7 +115,7 @@ } ], "subtitle" : { - "text" : "[Champions: 30] Last updated at 2025-08-01 21:00:14 GMT" + "text" : "[Champions: 30] Last updated at 2025-08-02 22:21:42 GMT" }, "title" : { "text" : "The Weekly Challenge [2019 - 2025]" diff --git a/stats/pwc-summary-91-120.json b/stats/pwc-summary-91-120.json index 67f58c9af2..5138aa0601 100644 --- a/stats/pwc-summary-91-120.json +++ b/stats/pwc-summary-91-120.json @@ -115,7 +115,7 @@ } ], "subtitle" : { - "text" : "[Champions: 30] Last updated at 2025-08-01 21:00:14 GMT" + "text" : "[Champions: 30] Last updated at 2025-08-02 22:21:42 GMT" }, "title" : { "text" : "The Weekly Challenge [2019 - 2025]" diff --git a/stats/pwc-summary.json b/stats/pwc-summary.json index 59faa74ff9..0638ba4e1f 100644 --- a/stats/pwc-summary.json +++ b/stats/pwc-summary.json @@ -294,7 +294,7 @@ 2, 1, 2, - 56, + 57, 1, 58, 1, @@ -396,8 +396,8 @@ 6, 0, 0, - 1, 9, + 1, 0, 104, 0, @@ -1006,7 +1006,7 @@ } ], "subtitle" : { - "text" : "[Champions: 327] Last updated at 2025-08-01 21:00:14 GMT" + "text" : "[Champions: 327] Last updated at 2025-08-02 22:21:42 GMT" }, "title" : { "text" : "The Weekly Challenge [2019 - 2025]" diff --git a/stats/pwc-yearly-language-summary.json b/stats/pwc-yearly-language-summary.json index bdea415084..cb6e0f6019 100644 --- a/stats/pwc-yearly-language-summary.json +++ b/stats/pwc-yearly-language-summary.json @@ -8,7 +8,7 @@ "data" : [ [ "Perl", - 1371 + 1373 ], [ "Raku", @@ -151,7 +151,7 @@ { "drilldown" : "2025", "name" : "2025", - "y" : 2619 + "y" : 2621 }, { "drilldown" : "2024", @@ -188,7 +188,7 @@ } ], "subtitle" : { - "text" : "Click the columns to drilldown the language breakdown. Last updated at 2025-08-01 21:00:14 GMT" + "text" : "Click the columns to drilldown the language breakdown. Last updated at 2025-08-02 22:21:42 GMT" }, "title" : { "text" : "The Weekly Challenge Language" |
