This commit is contained in:
parent
2b884fab65
commit
443632378e
|
@ -37,12 +37,8 @@ impl Day for Day02 {
|
|||
fw += n;
|
||||
depth += aim * n;
|
||||
}
|
||||
Instruction::Down(n) => {
|
||||
aim += n;
|
||||
}
|
||||
Instruction::Up(n) => {
|
||||
aim -= n;
|
||||
}
|
||||
Instruction::Down(n) => aim += n,
|
||||
Instruction::Up(n) => aim -= n,
|
||||
}
|
||||
}
|
||||
format!("{}", depth * fw)
|
||||
|
|
Loading…
Reference in a new issue