Advertisement
yasi04

Untitled

Dec 7th, 2021
819
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Python 0.46 KB | None | 0 0
  1. #include <string>
  2. #include <iostream>
  3. using namespace std;
  4.  
  5. main()
  6. {
  7.   int b;
  8.   cin >> b;
  9.   cout << b << endl;
  10.   for(int j = 0; j < b; j++)
  11.   {
  12.     string a = "", b = "", c = "";
  13.     int i = 0, s = 0, ch;
  14.     cin >> a;
  15.     while (a[i] != ' ')
  16.     {
  17.         b += a[i];
  18.         s++;
  19.         i++;
  20.     }
  21.     ch = stoi(b);
  22.     ch++;
  23.     c = to_string(ch);
  24.     for (int l = s; l < a.size(); l++)
  25.     {
  26.       c += a[l];
  27.     }
  28.     cout << c << endl;
  29.   }
  30. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement