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;
}
posted @ 2011-05-23 22:54  金海峰  阅读(203)  评论(0编辑  收藏  举报