This website requires JavaScript.
Explore
Drone CI
Help
Register
Sign In
sejo
/
advent-of-code
Watch
1
Star
0
Fork
You've already forked advent-of-code
0
Code
Issues
Pull Requests
Projects
Releases
Wiki
Activity
e5edc774dd
advent-of-code
/
12021
/
02
/
02_2_new.awk
16 lines
112 B
Awk
Raw
Blame
History
/forward/
{
y
+=
aim
*
$
2
x
+=
$
2
}
/down/
{
aim
+=
$
2
}
/up/
{
aim
-=
$
2
}
END
{
print
x
,
y
,
aim
print
x
*
y
}
Reference in New Issue
View Git Blame
Copy Permalink