362
Enunt eliminat la cererea autorului.
Exemplul 1:
a1z26.in
1 ANAAREMERE
a1z26.out
1 14 1 1 18 5 13 5 18 5
Exemplul 2:
a1z26.in
2 10 1 14 1 1 18 5 13 5 18 5
a1z26.out
ANAAREMERE
#include <bits/stdc++.h>
using namespace std;
ifstream cin("a1z26.in");
ofstream cout("a1z26.out");
int main()
{
int p;
cin >> p;
if(p == 1)
{
char ch;
while(cin >> ch)
cout << (int) (ch - 'A' + 1) << ' ';
}
else
{
int n;
cin >> n;
int x;
for(int i = 1 ; i <= n; ++i)
cin >> x, cout << (char) (x + 'A' - 1);
}
return 0;
}
Comentarii