题目链接:http://acm.hdu.edu.cn/showproblem.php?pid=4278
#include<cstdio>
#include<cstring>
#include<iostream>
#include<algorithm>
using namespace std; int map1[] = {,,,,,,,,,,}; int map2[] = {,,,,,,,,,,}; int main()
{
//freopen("E:\\acm\\input.txt","r",stdin);
int a;
int num;
while(cin>>a && a){
num = a;
int sum = ;
int cnt = ;
while(a){
int temp = a%;
a /= ;
sum += map1[temp] * map2[cnt++];
}
printf("%d: %d\n",num,sum);
}
}