fork download
  1. #include <bits/stdc++.h>
  2. #include <string>
  3. using namespace std;
  4.  
  5. int main()
  6. {
  7. string S, kq = " ";
  8. cin >> S;
  9. long long n = S.length();
  10. for(int i = 0; i < n; i +=2)
  11. {
  12. char chu = S[i];
  13. int so = S[i + 1]- '0';
  14. char chucu = chu + so;
  15. if(chucu > 'Z')
  16. chucu = 'A' +(chucu - 'Z' - 1);
  17. kq = kq + chucu;
  18. }
  19. cout << kq;
  20.  
  21. return 0;
  22. }
Success #stdin #stdout 0.01s 5280KB
stdin
Standard input is empty
stdout