#include
#include
FILE *in=fopen("Coefficent.txt","r+");
FILE *out=fopen("result.txt","w+");
void deal(int a,int b,int c);
void deal(int a,int b,int c,double x);
void deal(int a,int b,int c,double x1,double x2);
int main(){int a,b,c,a1,b1,c1;double x1,x2,disc;while((fscanf(in,"%d%d%d",&a1,&b1,&c1))!=EOF){a=a1;b=b1;c=c1;if((a!=0)&&(b!=0)){//ax*x+b*x+c或者a*x*x+b*x形式 disc=b*b-4*a*c;if(disc>0){x1=(-b-sqrt(disc))/(2*a);x2=(-b+sqrt(disc))/(2*a);deal(a,b,c,x1,x2);}else if(disc==0){x1=-b/(2*a);deal(a,b,c,x1); }else{deal(a,b,c);} }else if((a==0)&&(b!=0)){deal(a,b,c,-c/b);}else if((a!=0)&&(b==0)){if(a>0){deal(a,b,c,sqrt(a/c),-sqrt(a/c));}else{deal(a,b,c);}}else if((a==0)&&(b==0)){if(c==0){deal(a,b,c); }else{deal(a,b,c);}}}fclose(in);fclose(out);return 0;
}
void deal(int a,int b,int c){if(a==0&&b==0&&c==0){printf("a=%d\tb=%d\tc=%d时方程无穷解\n",a,b,c); }elseprintf("a=%d\tb=%d\tc=%d时方程无实数解\n",a,b,c);
}
void deal(int a,int b,int c,double x){printf("a=%d\tb=%d\tc=%d时方程具有单解x=%lf\n",a,b,c,x);fprintf(out,"%d\t%d\t%d\t%lf\n",a,b,c,x);
}
void deal(int a,int b,int c,double x1,double x2){printf("a=%d\tb=%d\tc=%d时方程具有双解x1=%lf\tx2=%lf\n",a,b,c,x1,x2);fprintf(out,"%d\t%d\t%d\t%lf\t%lf\n",a,b,c,x1,x2);
}
#include
#include
int fun(int n,int k){if(n==k||k==0) return 1;else return fun(n-1,k-1)+fun(n-1,k);
}
int main(){int n,k;scanf("%d%d",&n,&k);int s=fun(n,k);printf("n=%d,k=%d时s=%d\n",n,k,s);return 0;
}