SHARE
TWEET

Untitled

a guest Sep 22nd, 2019 94 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. #include <bits/stdc++.h>
  2.  
  3. using namespace std;
  4.  
  5. int main() {
  6.     // freopen("in", "r", stdin);
  7.     // freopen("out", "w", stdout);
  8.  
  9.     long long a, b;
  10.     while (1) {
  11.         cin >> a >> b;
  12.         if (a == 0) break;
  13.         long long c = a + b;
  14.         string str = to_string(c);
  15.         for (int i = 0; i < str.length(); i++) {
  16.             if (str[i] != '0') cout << str[i];
  17.         }
  18.         cout << endl;
  19.     }
  20.  
  21.     return 0;
  22. }
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
 
Top