Run ❯
Get your
own
website
❯
Run Code
Ctrl+Alt+R
Change Orientation
Ctrl+Alt+O
Change Theme
Ctrl+Alt+D
Change Language
Go to Spaces
Ctrl+Alt+P
use std::collections::HashSet; fn main() { let mut scores = HashSet::new(); scores.insert(10); scores.insert(20); scores.insert(10); scores.insert(30); let mut total = 0; for score in &scores { total += score; } println!("Total of unique scores: {}", total); }
Total of unique scores: 60