2 solutions

  • 1
    @ 2025-8-21 15:55:40
    #include<bits/stdc++.h>
    using namespace std;
    int n;
    int main(){
    	cin>>n;
    	int res=0;
    	while(n){
    		
    		int ge=n%10;
    		res=res*10+ge;
    		n/=10;
    		 
    	}
    	cout<<res;
    	
    	return 0;
    }
    
    • 1
      @ 2025-7-10 9:09:58
      #include<bits/stdc++.h>
      using namespace std;
      int main()
      {
          int N,i=1,s=0;
          cin>>N;
          while(N)
          { 
              s*=10;
      		s+=N%10;
              N/=10;
          }
          cout<<s;
          return 0;
      }
      
      • 1

      Information

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