Description
#include<iostream>
using namespace std;
int a[100000];
int b[100000];
int tmp1 = 0,tmp2 = 0;
int count1 = 0;
int main()
{
for(int i = 1000;i <= 9999 ;i++)
{
for(int j = 10 ;j <= 99;j++)
{
if((i/j==809)&&(i%j==1))
{
a[count1] = i;
b[count1] = j;
tmp1 = a[count1]/100;
tmp2 = a[count1]-tmp1*100;
if(b[count1]*8<100&&(tmp1-b[count1]*8<10)&&((tmp2+(tmp1-b[count1]*8)*100)-b[count1]*9==1)&&(tmp2+(tmp1-b[count1]*8)*100)>100&&(b[count1]*9)>100)
{
cout<<b[count1]<<endl;
cout<<a[count1]<<endl;
cout<<b[count1]*8<<endl;
cout<<tmp2+(tmp1-b[count1]*8)*100<<endl;
cout<<b[count1]*9<<endl;
}
}
}
}
return 0;
}
原文:https://www.cnblogs.com/yewanting/p/10533610.html