You are viewing a single comment's thread. Return to all comments →
fn countApplesAndOranges(s: i32, t: i32, a: i32, b: i32, apples: &[i32], oranges: &[i32]) { let mut apple_count = 0; let mut orange_count = 0; for ap in apples { let dis = a + ap; if dis >= s && dis <= t { apple_count += 1 } } for or in oranges { let dis = b + or; if dis >= s && dis <= t { orange_count += 1 } }
Seems like cookies are disabled on this browser, please enable them to open this website
Apple and Orange
You are viewing a single comment's thread. Return to all comments →
Rust