pub fn simulate(mut fishes: Vec<u64>, days: usize) -> Vec<u64> {
    for _ in 0..days {
        let new_fishes = fishes[0];
        for k in 1..fishes.len() {
            fishes[k - 1] = fishes[k];
        }
        fishes[6] += new_fishes;
        fishes[8] = new_fishes;
    }
    fishes
}
//tag::sol[]
/// simulate a given number of days
///
/// the timer values of all fishes are decreased by one. If the timer value is 0,
/// it is reset to 6 and the same amount of fishes with time value 8 is added.
:sol[]
simulate a given number of days

the timer values of all fishes are decreased by one. If the timer value is 0,
it is reset to 6 and the same amount of fishes with time value 8 is added.
: sol [] simulate a given number of days the timer values of all fishes are decreased by one . If the timer value is 0 it is reset to 6 and the same amount of fishes with time value 8 is added .
pub fn simulate(mut fishes: Vec<u64>, days: usize) -> Vec<u64> {
    for _ in 0..days {
        let new_fishes = fishes[0];
        for k in 1..fishes.len() {
            fishes[k - 1] = fishes[k];
        }
        fishes[6] += new_fishes;
        fishes[8] = new_fishes;
    }
    fishes
}
pub fn simulate ( mut fishes : Vec < u64 > , days : usize ) -> Vec < u64 > { for _ in 0 .. days { let new_fishes = fishes [ 0 ] ; for k in 1 .. fishes . len ( ) { fishes [ k - 1 ] = fishes [ k ] ; } fishes [ 6 ] += new_fishes ; fishes [ 8 ] = new_fishes ; } fishes }
tag::sol[]
simulate a given number of days
tag :: sol [] simulate a given number of days
fishes
Vec<u64>
days
usize
fishes
Vec<u64>
days
usize