题意是输出一个能被t整除的n位数。。。
思路很简单,输出t和n-1个0即可。当然,还需要特判一下t为1,n为10的情况。。
代码如下:
#include <bits/stdc++.h>
using namespace std; int main(void)
{
int n, t;
cin >> n >> t;
if(n== && t==)
{
cout << "-1" << endl;
return ;
}
cout << t;
n--;
while(n--)
{
cout << "";
}
cout << endl;
return ;
}