标签:import port pre names iostream pac important ret ==
原题描述:#include<iostream>
#include<cstdio>
using namespace std;
int main(){
//get in
int k;
while(cin>>k){
//程序处理
int n=0;
//枚举y
for(int y=k+1;y<=2*k;y++){
if((y*k)%(y-k)==0){
n++;
}
}
cout<<n<<endl;//先算出有多少组结果
for(int y=k+1;y<=2*k;y++){
if((y*k)%(y-k)==0){//能否被整除important
cout<<"1/"<<k<<" = 1/"<<(y*k)/(y-k)<<" + 1/"<<y<<endl;
}
}//输出结果
}
return 0;
}
标签:import port pre names iostream pac important ret ==
原文地址:http://blog.51cto.com/13986036/2309632