Skip to content

Instantly share code, notes, and snippets.

View sts10's full-sized avatar

Sam Schlinkert sts10

View GitHub Profile
@sts10
sts10 / day03.rs
Last active December 4, 2017 16:09 — forked from anonymous/playground.rs
Advent of Code 2017 Day 3, part 1
fn main() {
println!("Ring number for 12 is {}", get_ring_number(12));
println!("distance to closest railroad for 12 is {}", find_distance_to_closest_railroad(12));
println!("total steps for 12 is {}", find_distance_to_closest_railroad(12) + get_ring_number(12));
println!("total steps for 23 is {}", find_distance_to_closest_railroad(23) + get_ring_number(23));
println!("total steps for 1024 is {}", find_distance_to_closest_railroad(1024) + get_ring_number(1024));
println!("total steps for 347991 is {}", find_distance_to_closest_railroad(347991) + get_ring_number(347991));
}