fork download
  1. fn main() {
  2. println!("{:?}", (0..100u32).filter(|n| n.count_ones() % 2 == 1).collect::<Vec<_>>());
  3. }
  4.  
Success #stdin #stdout 0s 14872KB
stdin
Standard input is empty
stdout
[1, 2, 4, 7, 8, 11, 13, 14, 16, 19, 21, 22, 25, 26, 28, 31, 32, 35, 37, 38, 41, 42, 44, 47, 49, 50, 52, 55, 56, 59, 61, 62, 64, 67, 69, 70, 73, 74, 76, 79, 81, 82, 84, 87, 88, 91, 93, 94, 97, 98]