tasks a-s
This commit is contained in:
parent
47bf37c096
commit
b83f433714
12433 changed files with 156208 additions and 123 deletions
13
Task/Run-length-encoding/AWK/run-length-encoding-2.awk
Normal file
13
Task/Run-length-encoding/AWK/run-length-encoding-2.awk
Normal file
|
|
@ -0,0 +1,13 @@
|
|||
BEGIN {
|
||||
RS="[0-9]+[^0-9]"
|
||||
final = "";
|
||||
}
|
||||
{
|
||||
match(RT, /([0-9]+)([^0-9])/, r)
|
||||
for(i=0; i < int(r[1]); i++) {
|
||||
final = final r[2]
|
||||
}
|
||||
}
|
||||
END {
|
||||
print final
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue