美文网首页
1132 Cut Integer(20 分)

1132 Cut Integer(20 分)

作者: zjh3029 | 来源:发表于2018-08-24 14:19 被阅读0次

include<iostream>

include<vector>

include<string>

using namespace std;

int main()
{
int M, N;
cin>>M ;
for (int i = 0; i < M; i++)
{
cin >> N;
string str = to_string(N);
string str1(str.substr(0, str.length() / 2));
string str2(str.substr(str.length() / 2));
if ((stoi(str1)stoi(str2)==0))
{
cout << "No" << endl;
continue;
}
if (stoi(str) %(stoi(str1)
stoi(str2))==0)
{
cout << "Yes" << endl;
}
else
{
cout << "No" << endl;
}
}

system("pause");
return 0;

}

相关文章

网友评论

      本文标题:1132 Cut Integer(20 分)

      本文链接:https://www.haomeiwen.com/subject/kmibiftx.html