1 solutions

  • 1
    @ 2024-10-16 20:23:56

    参考答案:

    #include<iostream>
    #include<algorithm>
    #include<string>
    using namespace std;
    int main()
    {
        string s;
        int n;
        cin >> n;
    
        for (int i = 1; i <= 1000; ++i) s += to_string(i);
        cout << s[n - 1] << endl;
    
        return 0;
    }
    
    • 1

    Information

    ID
    5420
    Time
    1000ms
    Memory
    256MiB
    Difficulty
    1
    Tags
    # Submissions
    7
    Accepted
    2
    Uploaded By