Rust Locker Problem Number Theory
Your code seems fine. However, there is one part I'd definitely change: the scope of variables. For example, lockercount isn't necessary for more than the initial lc. We can keep its scope down:
    println!(&quot;How many students?&quot;);
    let lc = {
        let mut lockercount = String::new();
        io::stdin().read_line(&amp;mut lockercount).expect(&quot;expected int&quot;);
        lockercount.trim().parse().unwrap()
    };

Similarly, I would prefer to use enumerate instead of an explicit counter. An explicit counter might not be incremented by accident, but enumerate on an iterator will always fit:
    println!(&quot;Opened lockers:&quot;);
    for (n, v) in lockers.iter().enumerate() {
        if *v == true {
            print!(&quot;{}, &quot;, n + 1);
        }
    }

We could also get rid of the if via filter, but that's a little bit much:
    for (n, _v) in lockers.iter().enumerate().filter(|(_, &amp;b)| b) {
        print!(&quot;{}, &quot;, n + 1);
    }

On the algorithmic part of the code, I'd prefer to use the position explicitly instead of i*j:
    for i in 1..(lockers.len() + 1) {
        let mut pos: usize = i;
        while pos &lt;= lc {
            lockers[pos - 1] = !lockers[pos - 1];
            pos += i;
        }
    }

Again, instead of explicitly changing a counter, I would prefer an immutable variable, for example via step_by:
    for i in 1..(lockers.len() + 1) {
        for pos in (i..lc).step_by(i) {
            lockers[pos - 1] = !lockers[pos - 1];
        }
    }