aboutsummaryrefslogtreecommitdiff
path: root/2024/07
diff options
context:
space:
mode:
Diffstat (limited to '2024/07')
-rw-r--r--2024/07/puzzles.awk5
1 files changed, 2 insertions, 3 deletions
diff --git a/2024/07/puzzles.awk b/2024/07/puzzles.awk
index 53b23d3..45597e9 100644
--- a/2024/07/puzzles.awk
+++ b/2024/07/puzzles.awk
@@ -5,9 +5,8 @@
# START PART 2
function pow(x, e, n)
{
- n = 1
- while (e--)
- n *= x
+ for (n = 1; e--; n *= x)
+ ;
return n
}
# END PART 2