1 条题解

  • 0
    @ 2025-7-8 9:58:07

    C++ :

    #include <bits/stdc++.h>
    using namespace std;
    int main()
    {
        ios::sync_with_stdio(false);
        cin.tie(0);
        int n, a, b, c;
        cin >> n;
        a = b = c = 1;
        for (int i = 1; i <= n - 1; i++)
        {
            c++;
            if (c > 120)
            {
                b++;
                c = 1;
            }
            if (b > 3)
            {
                a++;
                b = 1;
            }
        }
        cout << a << " " << b << " " << c << "\n";
        return 0;
    }
    
    • 1

    信息

    ID
    1975
    时间
    1000ms
    内存
    128MiB
    难度
    7
    标签
    (无)
    递交数
    33
    已通过
    9
    上传者