1 solutions

  • 0
    @ 2025-3-3 16:33:13

    C++ :

    #include <bits/stdc++.h>
    using namespace std;
    
    int main(){
        int a,b,c,d;
        cin>>a;
        b = a / 10 % 10;
    	c = a % 10;
    	d = c * 10 + b;
    	cout<<d<<endl; 
    }
    

    Java :

    import java.util.Scanner;
    public class Main
    {   
    	public static void main(String[] args){
            Scanner sc = new Scanner(System.in);
            int x = sc.nextInt();
            int a = x/10;
            int b = x%10;
            System.out.println(b*10+a);
        
        }
    }
    
    • 1

    Information

    ID
    10500
    Time
    1000ms
    Memory
    16MiB
    Difficulty
    (None)
    Tags
    # Submissions
    0
    Accepted
    0
    Uploaded By