This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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)); | |
} |