There was an error while loading. Please reload this page.
1 parent 45e92aa commit 2f37578Copy full SHA for 2f37578
day02a/src/main.rs
@@ -4,7 +4,7 @@ pub fn main() {
4
include_bytes!("../input.txt")
5
.split(|b| *b == b'\n')
6
.map(|l| ((l[0] - b'A') as i16, (l[2] - b'X') as i16,))
7
- .map(|(a, b)| 1 + b + 3 * ((1 + b - a).rem_euclid(3)))
+ .map(|(a, b)| 1 + b + 3 * (1 + b - a).rem_euclid(3))
8
.sum::<i16>(),
9
);
10
}
0 commit comments