标签:c++ iostream namespace 博客 编程
4 2 5 7 123 123
5 0 8
代码如下:
#include <iostream>
using namespace std;
int main()
{
int n,m,i,s,t;
while(cin>>n>>m)
{
if(m==1)
cout<<0<<endl;
else
{
s=10;
for(i=1; i<=m; i++)
{
t=s/n;
s=s%n*10;
}
cout<<t<<endl;
}
}
return 0;
}
标签:c++ iostream namespace 博客 编程
原文地址:http://blog.csdn.net/liuchang54/article/details/43680327