Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include <string>
- #include <iostream>
- using namespace std;
- main()
- {
- int b;
- cin >> b;
- cout << b << endl;
- for(int j = 0; j < b; j++)
- {
- string a = "", b = "", c = "";
- int i = 0, s = 0, ch;
- cin >> a;
- while (a[i] != ' ')
- {
- b += a[i];
- s++;
- i++;
- }
- ch = stoi(b);
- ch++;
- c = to_string(ch);
- for (int l = s; l < a.size(); l++)
- {
- c += a[l];
- }
- cout << c << endl;
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement