fn is_pandigital(n: u64) -> bool {
    let mut seen = [false; 9];
    let mut n = n;
    let mut c = 0;

    while n != 0 {
        c += 1;
        let index = (n % 10) as usize;
        if index == 0 || seen[index - 1] == true {
            return false;
        } else {
            seen[index - 1] = true;
        }
        n /= 10;
    }

    c == 9
}
/// Instead of dealing with big integers, we compute the lower portion
/// of fib(n) and then use a variation of binets formula to calculate the
/// topmost 10 digits.
Instead of dealing with big integers, we compute the lower portion
of fib(n) and then use a variation of binets formula to calculate the
topmost 10 digits.
Instead of dealing with big integers we compute the lower portion of fib ( n ) and then use a variation of binets formula to calculate the topmost 10 digits .
fn is_pandigital(n: u64) -> bool {
    let mut seen = [false; 9];
    let mut n = n;
    let mut c = 0;
    while n != 0 {
        c += 1;
        let index = (n % 10) as usize;
        if index == 0 || seen[index - 1] == true {
            return false;
        } else {
            seen[index - 1] = true;
        }
        n /= 10;
    }
    c == 9
}
fn is_pandigital ( n : u64 ) -> bool { let mut seen = [ false ; 9 ] ; let mut n = n ; let mut c = 0 ; while n != 0 { c += 1 ; let index = ( n % 10 ) as usize ; if index == 0 || seen [ index - 1 ] == true { return false ; } else { seen [ index - 1 ] = true ; } n /= 10 ; } c == 9 }
Instead of dealing with big integers, we compute the lower portion
of fib(n) and then use a variation of binets formula to calculate the
topmost 10 digits.
Instead of dealing with big integers we compute the lower portion of fib ( n ) and then use a variation of binets formula to calculate the topmost 10 digits .
n
u64