poj2316

简单题

View Code
   
     
#include < iostream >
#include
< cstdio >
#include
< cstdlib >
#include
< cstring >
using namespace std;

string st, wheel;

int main()
{
// freopen("t.txt", "r", stdin);
getline(cin, wheel);
while (getline(cin, st) && st != "" )
{
for (unsigned i = 0 ; i < st.length(); i ++ )
wheel[i]
= ((wheel[i] - ' 0 ' ) + (st[i] - ' 0 ' )) % 10 + ' 0 ' ;
}
cout
<< wheel << endl;
return 0 ;
}

你可能感兴趣的:(poj)