1132 Cut Integer(20 分)

2018-08-24  本文已影响0人  zjh3029

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;

}

上一篇 下一篇

猜你喜欢

热点阅读