// ConsoleApplication20.cpp : 定义控制台应用程序的入口点。
//
#include "stdafx.h"
#include <iostream>
#include <string>
using namespace std;
int main()
{
string name;
cin >> name;
string seri;
//cin >> seri;
int cmpName[100];
int cmpSer[100];
int len = name.length();
for (int i = 0; i < len; i++)
{
int temp = name[i] % 10;
temp ^= i;//
temp+=2;
if (temp >= 10)
{
temp -= 10;
}
cmpName[i] = temp;
}
/*for (int i = 0; i < len; i++)
{
int temp = seri[i]%10;
cmpSer[i] = temp;
}*/
for (int i = 0; i < len; i++)
{
switch (cmpName[i])
{
case 9:
cout << 1;
break;
case 8:
cout << 0;
break;
case 7:
cout << 9;
break;
case 6:
cout << 8;
break;
case 5:
cout << 7;
break;
case 4:
cout << 6;
break;
case 3:
cout << 5;
break;
case 2:
cout << 4;
break;
case 1:
cout << 3;
break;
case 0:
cout << 2;
break;
default:
break;
}
//cout << (char)(cmpName[i]*) << endl;
}
cout << endl;
return 0;
}
//
#include "stdafx.h"
#include <iostream>
#include <string>
using namespace std;
int main()
{
string name;
cin >> name;
string seri;
//cin >> seri;
int cmpName[100];
int cmpSer[100];
int len = name.length();
for (int i = 0; i < len; i++)
{
int temp = name[i] % 10;
temp ^= i;//
temp+=2;
if (temp >= 10)
{
temp -= 10;
}
cmpName[i] = temp;
}
/*for (int i = 0; i < len; i++)
{
int temp = seri[i]%10;
cmpSer[i] = temp;
}*/
for (int i = 0; i < len; i++)
{
switch (cmpName[i])
{
case 9:
cout << 1;
break;
case 8:
cout << 0;
break;
case 7:
cout << 9;
break;
case 6:
cout << 8;
break;
case 5:
cout << 7;
break;
case 4:
cout << 6;
break;
case 3:
cout << 5;
break;
case 2:
cout << 4;
break;
case 1:
cout << 3;
break;
case 0:
cout << 2;
break;
default:
break;
}
//cout << (char)(cmpName[i]*) << endl;
}
cout << endl;
return 0;
}