Problem4976--部分A+B

4976: 部分A+B

[Creator : ]
Time Limit : 1.000 sec  Memory Limit : 256 MiB

Description

正整数 A 的 “DA(为 1 位整数)部分 ” 定义为由 A 中所有 DA 组成的新整数 PA。例如:给定 A=3862767DA=6,则 A 的 “6 部分 ”PA 是 66,因为 A 中有 2 个 6。
现给定 ADABDB,请编写程序计算 PA+PB

Input

输入在一行中依次给出 A、DA、B、DB,中间以空格分隔,其中 0 < A, B < 1010

Output

在一行中输出 PA + PB 的值。

Sample 1 Input

3862767 6 13530293 3

Sample 1 Output

399

HINT

【题目来源】
https://pintia.cn/problem-sets/994805260223102976/problems/994805306310115328

Source/Category

C++语法 1.4.循环结构