2 solutions

  • 1
    @ 2024-10-13 11:20:37
    #include<bits/stdc++.h>
    using namespace std;
    int main()
    {
        int n;
        cin>>n;
        int res=0;
        while(n)
        {
            int ge=n%10;
            res=res*10+ge;
            n/=10;
        }
        cout<<res;
        return 0;
    }
    
  • 0
    @ 2024-12-15 15:00:32

    #include<bits/stdc++.h> using namespace std; int main() { int n; cin>>n; int a=0; while(n) { int v=n%10; a=a*10+v; n/=10; } return 0; }

    • 1

    Information

    ID
    868
    Time
    1000ms
    Memory
    256MiB
    Difficulty
    1
    Tags
    (None)
    # Submissions
    183
    Accepted
    59
    Uploaded By