9 lines
126 B
Awk
9 lines
126 B
Awk
|
BEGIN { FS=" " }
|
||
|
|
||
|
/forward/ { h_pos += $2 }
|
||
|
/down/ { depth += $2 }
|
||
|
/up/ { depth -= $2 }
|
||
|
|
||
|
END { print depth * h_pos }
|
||
|
|