4 solutions

  • 1
    @ 2025-12-27 11:00:24

    #include <stdio.h>

    int main() { int n; scanf("%d", &n);

    // 取出每一位数字
    int ge = n % 10;      // 个位
    int shi = (n / 10) % 10; // 十位
    int bai = n / 100;    // 百位
    
    // 反向输出
    printf("%d%d%d\n", ge, shi, bai);
    
    return 0;
    

    }

    Information

    ID
    6723
    Time
    1000ms
    Memory
    128MiB
    Difficulty
    5
    Tags
    (None)
    # Submissions
    385
    Accepted
    141
    Uploaded By