aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--challenge-118/cheok-yin-fung/awk/ch-1.awk4
-rw-r--r--challenge-118/cheok-yin-fung/perl/ch-2.pl6
2 files changed, 5 insertions, 5 deletions
diff --git a/challenge-118/cheok-yin-fung/awk/ch-1.awk b/challenge-118/cheok-yin-fung/awk/ch-1.awk
index fe7e67c04b..18b20df3cf 100644
--- a/challenge-118/cheok-yin-fung/awk/ch-1.awk
+++ b/challenge-118/cheok-yin-fung/awk/ch-1.awk
@@ -4,8 +4,8 @@
# or: awk -f 'ch-1.awk' < file_contains_an_integer_on_each_line
{
- n = $0;
- i = 0;
+ n = $0
+ i = 0
while (n > 0) {
arr[i] = n % 2
n = int(n / 2)
diff --git a/challenge-118/cheok-yin-fung/perl/ch-2.pl b/challenge-118/cheok-yin-fung/perl/ch-2.pl
index d74f82c92e..3132a7fd82 100644
--- a/challenge-118/cheok-yin-fung/perl/ch-2.pl
+++ b/challenge-118/cheok-yin-fung/perl/ch-2.pl
@@ -48,9 +48,9 @@ my @min_paths = ();
my $dist_tbl =
[[0,3,2,3,2,3,4,5],
- [3,2,1,2,3,4,3,4], # >[1][1] = 2 only if the target is not a corner
- [2,1,4,3,2,3,4,5],
- [3,2,3,2,3,4,3,4],
+ [3,2,1,2,3,4,3,4], # >[1][1] = 2 only if the target
+ [2,1,4,3,2,3,4,5], # or the departure position
+ [3,2,3,2,3,4,3,4], # is not a corner
[2,3,2,3,4,3,4,5],
[3,4,3,4,3,4,5,4],
[4,3,4,3,4,5,4,5],