1 条题解

  • 0
    @ 2025-10-8 16:55:03
    #include <bits/stdc++.h>
    using namespace std;
    int main()
    {
        int n;
        scanf("%d", &n);
        long long x = 1;
        for (int i = 2; i <= n; i++)
        {
            x *= i;
            while (x % 10 == 0)
                x /= 10;
            x %= 100000000;
        }
        printf("%lld", x % 10);
        return 0;
    }
    
    • 1

    【模拟】[USACO3.2] 阶乘问题Factorials

    信息

    ID
    1025
    时间
    1000ms
    内存
    128MiB
    难度
    7
    标签
    递交数
    629
    已通过
    139
    上传者