fork download
  1. #include<iostream>
  2. #include<bits/stdc++.h>
  3. using namespace std;
  4. int main()
  5. {
  6. // Dùng cho cách 1
  7. string m = "abcdefghijklmnopqrstuvwxyz ";
  8.  
  9. int a[225]; // int
  10. int n, i;
  11. cin >> n;
  12. for(i=0;i<n;i++)
  13. {
  14. cin >> a[i];
  15. }
  16. for(i=0;i<n;i++)
  17. {
  18. // Cách 1
  19. cout << m[a[i]-1];
  20.  
  21. // Cách 2
  22. //cout << (char)(a[i] != 27 ? a[i] + 96 : ' ');
  23. }
  24. return 0;
  25. }
Success #stdin #stdout 0s 4536KB
stdin
19
18 5 22 5 18 19 5 27 20 8 5 27 3 9 16 8 5 18 19
stdout
reverse the ciphers