2 solutions

  • 0
    @ 2024-7-8 11:05:37
    #include<bits/stdc++.h>
    using namespace std;
    int main()
    {
    	int n,k;
    	cin>>n;
            if(n==0)
            {
                cout<<0;
            }
    	while(n!=0)
        {
            k=n%10;
            cout<<k<<" ";
            n/=10;
        }
    	return 0;
    }
    

    Information

    ID
    43
    Time
    1000ms
    Memory
    256MiB
    Difficulty
    1
    Tags
    (None)
    # Submissions
    214
    Accepted
    71
    Uploaded By