#include<stdio.h>
#include<string.h>
int main()
{
int l1,l2,i,n1=0,n2=0;
char A[11],B[11],Alittle,Blittle;
scanf("%s %c %s %c",&A,&Alittle,&B,&Blittle);
l1=strlen(A);
l2=strlen(B);
for(i=0;i<l1;i++)
{
if(A[i]==Alittle)
{
n1=n110+Alittle-‘0’;
}
}
for(i=0;i<l2;i++)
{
if(B[i]==Blittle)
{
n2=n210+Blittle-‘0’;
}
}
printf("%d",n1+n2);
return 0;
}
来源:CSDN
作者:XITMan
链接:https://blog.csdn.net/XITMan/article/details/104044509