1 solutions

  • 0
    @ 2023-12-10 11:31:22
    #include <iostream>
    using namespace std;
    int change(int a){
    	int n = 0;
    	int s;
    	int flag = 0;
    	do{
    		s = a % 10;
    		if(s == 0 && flag == 0)
    		{
    			n = n;
    		}else {
    			n = n * 10 + s;
    			flag++; 
    		}
    		a = a / 10;
    	}while(a != 0);
    	return (n);
    }
    int main()
    {
    	int a , b;
    	cin >> a >> b;
    	a = change(a) , b = change (b);
    	int sum = a + b;
    	sum = change(sum);
    	cout << sum;
    	return 0;
    }
    
    • 1

    Information

    ID
    1778
    Time
    1000ms
    Memory
    512MiB
    Difficulty
    10
    Tags
    # Submissions
    2
    Accepted
    1
    Uploaded By