#include #include #include int main() { double x=0; long double value =0; int count =0; double arr[50]={0}; scanf("%lf",&x); while(scanf("%lf",&value)!=EOF){ if(isalpha(value)!=0){ return 0; } arr[count]=value; count++; } value=0; for(int i =0;i=0;i++){ value+=arr[i]*pow(x,count-1-i); } if(value>=40000&&value<=1000000){ value =((int)(value*100 - 0.5)/100.00); } printf("Vysledok je :%.2Lf\n",value); return 0; }