# 注：本题只需要提交需要完善部分的代码，请按照C/C++方式提交。

C++代码部分
#include <iostream>
using namespace std;
/*
请完善该部分代码
*/

int main()
{
int X,Y,Z;
int A,B,C;
int value1,value2;
cin>>X>>Y>>Z;
value1 =magicNum(X,Y,Z);
cin>>A>>B>>C;
value2 =magicNum(A,B,C);
if(value1==value2)
cout<<"Yes"<<endl;
else
cout<<"No"<<endl;
return 0;
}

C代码部分

#include <stdio.h>
/*
请完善该部分代码
*/

int main()
{
int X,Y,Z;
int A,B,C;
int value1,value2;
scanf("%d%d%d",&X,&Y,&Z);
value1 =magicNum(X,Y,Z);
scanf("%d%d%d",&A,&B,&C);
value2 =magicNum(A,B,C);
if(value1==value2)
printf("Yes\n");
else
printf("No\n");
return 0;
}

``````1992 12 1
1993 1 11``````

``Yes``

``````program p1000(Input,Output);
var
a,b,c,d,e,f,i:integer;
begin
a := a+b+c;
d := d+e+f;
i := 0;
if (a/1000) <>(d/1000) then
i := 1;
if (a mod 1000/100) <>(d mod 1000/100) then
i := 1;
if (a mod 100/10) <>(d mod 100/10) then
i := 1;
if (a mod 10) <>(d mod 10) then
i := 1;
if i=0 then
writeln('Yes')
else
writeln('No');
end.``````

``````
#include <iostream>
using namespace std;
int magicNum(int year,int month,int day)
{
int value=year+month+day;
int sum=0;
while(value>0)
{
sum+=value%10;
value=value/10;
}
return sum;
}

int main()
{
int X,Y,Z;
int A,B,C;
int value1,value2;
cin>>X>>Y>>Z;
value1 =magicNum(X,Y,Z);
cin>>A>>B>>C;
value2 =magicNum(A,B,C);
if(value1==value2)
cout<<"Yes"<<endl;
else
cout<<"No"<<endl;
return 0;
}
``````