#include <iostream>
#include <cmath>
using namespace std;
#define ll long long
int main()
{
ll a,da,b,db;
cin>>a>>da>>b>>db;
int count1 = 0;
int count2 = 0;
while(a>0)
{
if(a%10==da)count1++;
a/=10;
}
while (b>0)
{
if(b%10==db)count2++;
b/=10;
}
int sum = 0;
for(int i = 0;i<count1;i++)
sum = sum+da*pow(10,i);
for(int i = 0;i<count2;i++)
sum = sum+db*pow(10,i);
cout<<sum;
return 0;
}
相关文章
- 03-19模拟 : 1016 部分A+B (15 分)
- 03-19PAT乙级1016
- 03-191016 部分A+B (15分)
- 03-19pat-1016(模拟)
- 03-19PAT 1016 部分A+B
- 03-19PAT Basic 1016
- 03-19[PAT乙级] Practise 1016 部分A+B
- 03-19PAT (Basic Level) Practice 1016
- 03-19PAT B-1016 部分A+B
- 03-19PAT乙级1016