Ad
Code
Diff
  • fn flip_the_number(mut x: u64) -> u64 {
        let mut y = 0;
        while x != 0 {
            y = y * 10 + x % 10;
            x /= 10;
        }
        y
    }
    • fn flip_the_number(x: &u64) -> u64 {
    • let mut x = *x;
    • fn flip_the_number(mut x: u64) -> u64 {
    • let mut y = 0;
    • while x != 0 {
    • y = y * 10 + x % 10;
    • x /= 10;
    • }
    • y
    • }