aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMohammad Sajid Anwar <mohammad.anwar@yahoo.com>2025-05-27 11:39:31 +0100
committerMohammad Sajid Anwar <mohammad.anwar@yahoo.com>2025-05-27 11:39:31 +0100
commit7d0aad1bc4c3e0ad60924ff71c9baba85bafbf80 (patch)
tree7af08b110c2917b318e6762d5b6ce38c9c96b7ec
parente27e602ad21dc021475821391b63f6611f970605 (diff)
downloadperlweeklychallenge-club-7d0aad1bc4c3e0ad60924ff71c9baba85bafbf80.tar.gz
perlweeklychallenge-club-7d0aad1bc4c3e0ad60924ff71c9baba85bafbf80.tar.bz2
perlweeklychallenge-club-7d0aad1bc4c3e0ad60924ff71c9baba85bafbf80.zip
- Added solutions by Feng Chang.
- Added solutions by Eric Cheung. - Added solutions by Andrew Shitov. - Added solutions by E. Choroba. - Added solutions by Andreas Mahnke. - Added solutions by Peter Campbell Smith. - Added solutions by Neils van Dijke. - Added solutions by Luca Ferrari. - Added solutions by PokGoPun. - Added solutions by David Ferrone. - Added solutions by W. Luis Mochan. - Added solutions by Peter Meszaros. - Added solutions by Conor Hoekstra. - Added solutions by Roger Bell_West. - Added solutions by Kjetil Skotheim.
-rwxr-xr-xchallenge-323/eric-cheung/python/ch-1.py8
-rwxr-xr-xchallenge-323/eric-cheung/python/ch-2.py47
-rwxr-xr-xchallenge-323/perlboy1967/perl/ch-1.pl (renamed from challenge-323/perlboy1967/perl/ch1.pl)0
-rwxr-xr-xchallenge-323/perlboy1967/perl/ch-2.pl (renamed from challenge-323/perlboy1967/perl/ch2.pl)0
-rw-r--r--stats/pwc-challenge-322.json563
-rw-r--r--stats/pwc-current.json314
-rw-r--r--stats/pwc-language-breakdown-2019.json2
-rw-r--r--stats/pwc-language-breakdown-2020.json2
-rw-r--r--stats/pwc-language-breakdown-2021.json2
-rw-r--r--stats/pwc-language-breakdown-2022.json2
-rw-r--r--stats/pwc-language-breakdown-2023.json2
-rw-r--r--stats/pwc-language-breakdown-2024.json2
-rw-r--r--stats/pwc-language-breakdown-2025.json25
-rw-r--r--stats/pwc-language-breakdown-summary.json8
-rw-r--r--stats/pwc-leaders.json82
-rw-r--r--stats/pwc-summary-1-30.json10
-rw-r--r--stats/pwc-summary-121-150.json2
-rw-r--r--stats/pwc-summary-151-180.json8
-rw-r--r--stats/pwc-summary-181-210.json4
-rw-r--r--stats/pwc-summary-211-240.json8
-rw-r--r--stats/pwc-summary-241-270.json6
-rw-r--r--stats/pwc-summary-271-300.json2
-rw-r--r--stats/pwc-summary-301-330.json6
-rw-r--r--stats/pwc-summary-31-60.json4
-rw-r--r--stats/pwc-summary-61-90.json8
-rw-r--r--stats/pwc-summary-91-120.json2
-rw-r--r--stats/pwc-summary.json38
-rw-r--r--stats/pwc-yearly-language-summary.json10
28 files changed, 754 insertions, 413 deletions
diff --git a/challenge-323/eric-cheung/python/ch-1.py b/challenge-323/eric-cheung/python/ch-1.py
new file mode 100755
index 0000000000..c5134cdcab
--- /dev/null
+++ b/challenge-323/eric-cheung/python/ch-1.py
@@ -0,0 +1,8 @@
+
+## arrOperations = ["--x", "x++", "x++"] ## Example 1
+## arrOperations = ["x++", "++x", "x++"] ## Example 2
+arrOperations = ["x++", "++x", "--x", "x--"] ## Example 3
+
+arrOutput = [1 if "++" in strOperator else -1 for strOperator in arrOperations]
+
+print (sum(arrOutput))
diff --git a/challenge-323/eric-cheung/python/ch-2.py b/challenge-323/eric-cheung/python/ch-2.py
new file mode 100755
index 0000000000..50e9c6117f
--- /dev/null
+++ b/challenge-323/eric-cheung/python/ch-2.py
@@ -0,0 +1,47 @@
+
+## Ref.:
+## https://leetcode.com/problems/calculate-amount-paid-in-taxes/description/
+
+## Example 1
+nIncome = 10
+arrTax = [[3, 50], [7, 10], [12, 25]]
+
+## Example 2
+## nIncome = 2
+## arrTax = [[1, 0], [4, 25], [5, 50]]
+
+## Example 3
+## nIncome = 0
+## arrTax = [[2, 50]]
+
+nBalance = nIncome
+nPrevTaxCeil = 0
+dTaxAmout = 0
+
+for arrTaxPair in arrTax:
+ if nBalance == 0:
+ break
+
+ nTempTax = arrTaxPair[0]
+ nCeil = nTempTax - nPrevTaxCeil
+ dTaxPer = arrTaxPair[1] / 100
+
+ ## if nBalance >= nCeil:
+ ## dTaxAmout = dTaxAmout + nCeil * dTaxPer
+ ## nBalance = nBalance - nCeil
+ ## else:
+ ## dTaxAmout = dTaxAmout + nBalance * dTaxPer
+ ## nBalance = 0
+
+ nTempAmount = min(nCeil, nBalance)
+ dTaxAmout = dTaxAmout + nTempAmount * dTaxPer
+ nBalance = nBalance - nTempAmount
+
+ nPrevTaxCeil = nTempTax
+
+ ## print ("")
+ ## print ("===")
+ ## print (nBalance, dTaxAmout)
+ ## print ("===")
+
+print (dTaxAmout)
diff --git a/challenge-323/perlboy1967/perl/ch1.pl b/challenge-323/perlboy1967/perl/ch-1.pl
index a9097270d9..a9097270d9 100755
--- a/challenge-323/perlboy1967/perl/ch1.pl
+++ b/challenge-323/perlboy1967/perl/ch-1.pl
diff --git a/challenge-323/perlboy1967/perl/ch2.pl b/challenge-323/perlboy1967/perl/ch-2.pl
index 25fa9b9d2f..25fa9b9d2f 100755
--- a/challenge-323/perlboy1967/perl/ch2.pl
+++ b/challenge-323/perlboy1967/perl/ch-2.pl
diff --git a/stats/pwc-challenge-322.json b/stats/pwc-challenge-322.json
new file mode 100644
index 0000000000..e2d319e3a1
--- /dev/null
+++ b/stats/pwc-challenge-322.json
@@ -0,0 +1,563 @@
+{
+ "chart" : {
+ "type" : "column"
+ },
+ "drilldown" : {
+ "series" : [
+ {
+ "data" : [
+ [
+ "Perl",
+ 2
+ ],
+ [
+ "Blog",
+ 2
+ ]
+ ],
+ "id" : "Adam Russell",
+ "name" : "Adam Russell"
+ },
+ {
+ "data" : [
+ [
+ "Perl",
+ 2
+ ],
+ [
+ "Blog",
+ 1
+ ]
+ ],
+ "id" : "Ali Moradi",
+ "name" : "Ali Moradi"
+ },
+ {
+ "data" : [
+ [
+ "Perl",
+ 2
+ ]
+ ],
+ "id" : "Andreas Mahnke",
+ "name" : "Andreas Mahnke"
+ },
+ {
+ "data" : [
+ [
+ "Raku",
+ 2
+ ]
+ ],
+ "id" : "Andrew Shitov",
+ "name" : "Andrew Shitov"
+ },
+ {
+ "data" : [
+ [
+ "Raku",
+ 2
+ ],
+ [
+ "Blog",
+ 1
+ ]
+ ],
+ "id" : "Arne Sommer",
+ "name" : "Arne Sommer"
+ },
+ {
+ "data" : [
+ [
+ "Perl",
+ 2
+ ],
+ [
+ "Raku",
+ 2
+ ]
+ ],
+ "id" : "Athanasius",
+ "name" : "Athanasius"
+ },
+ {
+ "data" : [
+ [
+ "Perl",
+ 2
+ ],
+ [
+ "Blog",
+ 1
+ ]
+ ],
+ "id" : "Bob Lied",
+ "name" : "Bob Lied"
+ },
+ {
+ "data" : [
+ [
+ "Perl",
+ 2
+ ],
+ [
+ "Blog",
+ 1
+ ]
+ ],
+ "id" : "Dave Jacoby",
+ "name" : "Dave Jacoby"
+ },
+ {
+ "data" : [
+ [
+ "Perl",
+ 2
+ ]
+ ],
+ "id" : "David Ferrone",
+ "name" : "David Ferrone"
+ },
+ {
+ "data" : [
+ [
+ "Perl",
+ 2
+ ]
+ ],
+ "id" : "E. Choroba",
+ "name" : "E. Choroba"
+ },
+ {
+ "data" : [
+ [
+ "Raku",
+ 2
+ ]
+ ],
+ "id" : "Feng Chang",
+ "name" : "Feng Chang"
+ },
+ {
+ "data" : [
+ [
+ "Perl",
+ 2
+ ],
+ [
+ "Raku",
+ 2
+ ],
+ [
+ "Blog",
+ 1
+ ]
+ ],
+ "id" : "Jaldhar H. Vyas",
+ "name" : "Jaldhar H. Vyas"
+ },
+ {
+ "data" : [
+ [
+ "Raku",
+ 2
+ ]
+ ],
+ "id" : "Jan Krnavek",
+ "name" : "Jan Krnavek"
+ },
+ {
+ "data" : [
+ [
+ "Perl",
+ 2
+ ],
+ [
+ "Blog",
+ 1
+ ]
+ ],
+ "id" : "Jorg Sommrey",
+ "name" : "Jorg Sommrey"
+ },
+ {
+ "data" : [
+ [
+ "Raku",
+ 2
+ ],
+ [
+ "Blog",
+ 10
+ ]
+ ],
+ "id" : "Luca Ferrari",
+ "name" : "Luca Ferrari"
+ },
+ {
+ "data" : [
+ [
+ "Raku",
+ 2
+ ]
+ ],
+ "id" : "Mark Anderson",
+ "name" : "Mark Anderson"
+ },
+ {
+ "data" : [
+ [
+ "Perl",
+ 2
+ ],
+ [
+ "Blog",
+ 1
+ ]
+ ],
+ "id" : "Matthias Muth",
+ "name" : "Matthias Muth"
+ },
+ {
+ "data" : [
+ [
+ "Perl",
+ 2
+ ]
+ ],
+ "id" : "Niels van Dijke",
+ "name" : "Niels van Dijke"
+ },
+ {
+ "data" : [
+ [
+ "Perl",
+ 2
+ ],
+ [
+ "Raku",
+ 2
+ ],
+ [
+ "Blog",
+ 1
+ ]
+ ],
+ "id" : "Packy Anderson",
+ "name" : "Packy Anderson"
+ },
+ {
+ "data" : [
+ [
+ "Perl",
+ 2
+ ],
+ [
+ "Blog",
+ 1
+ ]
+ ],
+ "id" : "Peter Campbell Smith",
+ "name" : "Peter Campbell Smith"
+ },
+ {
+ "data" : [
+ [
+ "Perl",
+ 2
+ ]
+ ],
+ "id" : "Peter Meszaros",
+ "name" : "Peter Meszaros"
+ },
+ {
+ "data" : [
+ [
+ "Perl",
+ 2
+ ],
+ [
+ "Blog",
+ 1
+ ]
+ ],
+ "id" : "Robbie Hatley",
+ "name" : "Robbie Hatley"
+ },
+ {
+ "data" : [
+ [
+ "Raku",
+ 2
+ ]
+ ],
+ "id" : "Robert Ransbottom",
+ "name" : "Robert Ransbottom"
+ },
+ {
+ "data" : [
+ [
+ "Perl",
+ 2
+ ],
+ [
+ "Raku",
+ 2
+ ],
+ [
+ "Blog",
+ 1
+ ]
+ ],
+ "id" : "Roger Bell_West",
+ "name" : "Roger Bell_West"
+ },
+ {
+ "data" : [
+ [
+ "Perl",
+ 2
+ ],
+ [
+ "Blog",
+ 1
+ ]
+ ],
+ "id" : "Simon Green",
+ "name" : "Simon Green"
+ },
+ {
+ "data" : [
+ [
+ "Perl",
+ 2
+ ],
+ [
+ "Raku",
+ 2
+ ]
+ ],
+ "id" : "Ulrich Rieke",
+ "name" : "Ulrich Rieke"
+ },
+ {
+ "data" : [
+ [
+ "Perl",
+ 2
+ ],
+ [
+ "Blog",
+ 1
+ ]
+ ],
+ "id" : "W. Luis Mochan",
+ "name" : "W. Luis Mochan"
+ },
+ {
+ "data" : [
+ [
+ "Perl",
+ 2
+ ]
+ ],
+ "id" : "Wanderdoc",
+ "name" : "Wanderdoc"
+ },
+ {
+ "data" : [
+ [
+ "Perl",
+ 2
+ ]
+ ],
+ "id" : "Yitzchak Scott-Thoennes",
+ "name" : "Yitzchak Scott-Thoennes"
+ }
+ ]
+ },
+ "legend" : {
+ "enabled" : 0
+ },
+ "plotOptions" : {
+ "series" : {
+ "borderWidth" : 0,
+ "dataLabels" : {
+ "enabled" : 1,
+ "format" : "{point.y}"
+ }
+ }
+ },
+ "series" : [
+ {
+ "colorByPoint" : 1,
+ "data" : [
+ {
+ "drilldown" : "Adam Russell",
+ "name" : "Adam Russell",
+ "y" : 4
+ },
+ {
+ "drilldown" : "Ali Moradi",
+ "name" : "Ali Moradi",
+ "y" : 3
+ },
+ {
+ "drilldown" : "Andreas Mahnke",
+ "name" : "Andreas Mahnke",
+ "y" : 2
+ },
+ {
+ "drilldown" : "Andrew Shitov",
+ "name" : "Andrew Shitov",
+ "y" : 2
+ },
+ {
+ "drilldown" : "Arne Sommer",
+ "name" : "Arne Sommer",
+ "y" : 3
+ },
+ {
+ "drilldown" : "Athanasius",
+ "name" : "Athanasius",
+ "y" : 4
+ },
+ {
+ "drilldown" : "Bob Lied",
+ "name" : "Bob Lied",
+ "y" : 3
+ },
+ {
+ "drilldown" : "Dave Jacoby",
+ "name" : "Dave Jacoby",
+ "y" : 3
+ },
+ {
+ "drilldown" : "David Ferrone",
+ "name" : "David Ferrone",
+ "y" : 2
+ },
+ {
+ "drilldown" : "E. Choroba",
+ "name" : "E. Choroba",
+ "y" : 2
+ },
+ {
+ "drilldown" : "Feng Chang",
+ "name" : "Feng Chang",
+ "y" : 2
+ },
+ {
+ "drilldown" : "Jaldhar H. Vyas",
+ "name" : "Jaldhar H. Vyas",
+ "y" : 5
+ },
+ {
+ "drilldown" : "Jan Krnavek",
+ "name" : "Jan Krnavek",
+ "y" : 2
+ },
+ {
+ "drilldown" : "Jorg Sommrey",
+ "name" : "Jorg Sommrey",
+ "y" : 3
+ },
+ {
+ "drilldown" : "Luca Ferrari",
+ "name" : "Luca Ferrari",
+ "y" : 12
+ },
+ {
+ "drilldown" : "Mark Anderson",
+ "name" : "Mark Anderson",
+ "y" : 2
+ },
+ {
+ "drilldown" : "Matthias Muth",
+ "name" : "Matthias Muth",
+ "y" : 3
+ },
+ {
+ "drilldown" : "Niels van Dijke",
+ "name" : "Niels van Dijke",
+ "y" : 2
+ },
+ {
+ "drilldown" : "Packy Anderson",
+ "name" : "Packy Anderson",
+ "y" : 5
+ },
+ {
+ "drilldown" : "Peter Campbell Smith",
+ "name" : "Peter Campbell Smith",
+ "y" : 3
+ },
+ {
+ "drilldown" : "Peter Meszaros",
+ "name" : "Peter Meszaros",
+ "y" : 2
+ },
+ {
+ "drilldown" : "Robbie Hatley",
+ "name" : "Robbie Hatley",
+ "y" : 3
+ },
+ {
+ "drilldown" : "Robert Ransbottom",
+ "name" : "Robert Ransbottom",
+ "y" : 2
+ },
+ {
+ "drilldown" : "Roger Bell_West",
+ "name" : "Roger Bell_West",
+ "y" : 5
+ },
+ {
+ "drilldown" : "Simon Green",
+ "name" : "Simon Green",
+ "y" : 3
+ },
+ {
+ "drilldown" : "Ulrich Rieke",
+ "name" : "Ulrich Rieke",
+ "y" : 4
+ },
+ {
+ "drilldown" : "W. Luis Mochan",
+ "name" : "W. Luis Mochan",
+ "y" : 3
+ },
+ {
+ "drilldown" : "Wanderdoc",
+ "name" : "Wanderdoc",
+ "y" : 2
+ },
+ {
+ "drilldown" : "Yitzchak Scott-Thoennes",
+ "name" : "Yitzchak Scott-Thoennes",
+ "y" : 2
+ }
+ ],
+ "name" : "The Weekly Challenge - 322"
+ }
+ ],
+ "subtitle" : {
+ "text" : "[Champions: 29] Last updated at 2025-05-27 10:38:16 GMT"
+ },
+ "title" : {
+ "text" : "The Weekly Challenge - 322"
+ },
+ "tooltip" : {
+ "followPointer" : 1,
+ "headerFormat" : "<span style='font-size:11px'>{series.name}</span><br/>",
+ "pointFormat" : "<span style='color:{point.color}'>{point.name}</span>: <b>{point.y:f}</b><br/>"
+ },
+ "xAxis" : {
+ "type" : "category"
+ },
+ "yAxis" : {
+ "title" : {
+ "text" : "Total Solutions"
+ }
+ }
+}
diff --git a/stats/pwc-current.json b/stats/pwc-current.json
index 164820ae4a..fccc1fd507 100644
--- a/stats/pwc-current.json
+++ b/stats/pwc-current.json
@@ -12,20 +12,6 @@
],
[
"Blog",
- 2
- ]
- ],
- "id" : "Adam Russell",
- "name" : "Adam Russell"
- },
- {
- "data" : [
- [
- "Perl",
- 2
- ],
- [
- "Blog",
1
]
],
@@ -55,62 +41,6 @@
{
"data" : [
[
- "Raku",
- 2
- ],
- [
- "Blog",
- 1
- ]
- ],
- "id" : "Arne Sommer",
- "name" : "Arne Sommer"
- },
- {
- "data" : [
- [
- "Perl",
- 2
- ],
- [
- "Raku",
- 2
- ]
- ],
- "id" : "Athanasius",
- "name" : "Athanasius"
- },
- {
- "data" : [
- [
- "Perl",
- 2
- ],
- [
- "Blog",
- 1
- ]
- ],
- "id" : "Bob Lied",
- "name" : "Bob Lied"
- },
- {
- "data" : [
- [
- "Perl",
- 2
- ],
- [
- "Blog",
- 1
- ]
- ],
- "id" : "Dave Jacoby",
- "name" : "Dave Jacoby"
- },
- {
- "data" : [
- [
"Perl",
2
]
@@ -143,42 +73,10 @@
[
"Perl",
2
- ],
- [
- "Raku",
- 2
- ],
- [
- "Blog",
- 1
- ]
- ],
- "id" : "Jaldhar H. Vyas",
- "name" : "Jaldhar H. Vyas"
- },
- {
- "data" : [
- [
- "Raku",
- 2
- ]
- ],
- "id" : "Jan Krnavek",
- "name" : "Jan Krnavek"
- },
- {
- "data" : [
- [
- "Perl",
- 2
- ],
- [
- "Blog",
- 1
]
],
- "id" : "Jorg Sommrey",
- "name" : "Jorg Sommrey"
+ "id" : "Kjetil Skotheim",
+ "name" : "Kjetil Skotheim"
},
{
"data" : [
@@ -197,30 +95,6 @@
{
"data" : [
[
- "Raku",
- 2
- ]
- ],
- "id" : "Mark Anderson",
- "name" : "Mark Anderson"
- },
- {
- "data" : [
- [
- "Perl",
- 2
- ],
- [
- "Blog",
- 1
- ]
- ],
- "id" : "Matthias Muth",
- "name" : "Matthias Muth"
- },
- {
- "data" : [
- [
"Perl",
2
]
@@ -235,24 +109,6 @@
2
],
[
- "Raku",
- 2
- ],
- [
- "Blog",
- 1
- ]
- ],
- "id" : "Packy Anderson",
- "name" : "Packy Anderson"
- },
- {
- "data" : [
- [
- "Perl",
- 2
- ],
- [
"Blog",
1
]
@@ -277,38 +133,10 @@
2
],
[
- "Blog",
- 1
- ]
- ],
- "id" : "Robbie Hatley",
- "name" : "Robbie Hatley"
- },
- {
- "data" : [
- [
"Raku",
2
]
],
- "id" : "Robert Ransbottom",
- "name" : "Robert Ransbottom"
- },
- {
- "data" : [
- [
- "Perl",
- 2
- ],
- [
- "Raku",
- 2
- ],
- [
- "Blog",
- 1
- ]
- ],
"id" : "Roger Bell_West",
"name" : "Roger Bell_West"
},
@@ -323,56 +151,8 @@
1
]
],
- "id" : "Simon Green",
- "name" : "Simon Green"
- },
- {
- "data" : [
- [
- "Perl",
- 2
- ],
- [
- "Raku",
- 2
- ]
- ],
- "id" : "Ulrich Rieke",
- "name" : "Ulrich Rieke"
- },
- {
- "data" : [
- [
- "Perl",
- 2
- ],
- [
- "Blog",
- 1
- ]
- ],
"id" : "W. Luis Mochan",
"name" : "W. Luis Mochan"
- },
- {
- "data" : [
- [
- "Perl",
- 2
- ]
- ],
- "id" : "Wanderdoc",
- "name" : "Wanderdoc"
- },
- {
- "data" : [
- [
- "Perl",
- 2
- ]
- ],
- "id" : "Yitzchak Scott-Thoennes",
- "name" : "Yitzchak Scott-Thoennes"
}
]
},
@@ -393,11 +173,6 @@
"colorByPoint" : 1,
"data" : [
{
- "drilldown" : "Adam Russell",
- "name" : "Adam Russell",
- "y" : 4
- },
- {
"drilldown" : "Ali Moradi",
"name" : "Ali Moradi",
"y" : 3
@@ -413,26 +188,6 @@
"y" : 2
},
{
- "drilldown" : "Arne Sommer",
- "name" : "Arne Sommer",
- "y" : 3
- },
- {
- "drilldown" : "Athanasius",
- "name" : "Athanasius",
- "y" : 4
- },
- {
- "drilldown" : "Bob Lied",
- "name" : "Bob Lied",
- "y" : 3
- },
- {
- "drilldown" : "Dave Jacoby",
- "name" : "Dave Jacoby",
- "y" : 3
- },
- {
"drilldown" : "David Ferrone",
"name" : "David Ferrone",
"y" : 2
@@ -448,46 +203,21 @@
"y" : 2
},
{
- "drilldown" : "Jaldhar H. Vyas",
- "name" : "Jaldhar H. Vyas",
- "y" : 5
- },
- {
- "d