NOJ/15/main.c
Saturneric 52668c4122 Add.
2020-09-01 00:46:43 +08:00

16 lines
226 B
C

#include <stdio.h>
int main(void){
double a = 0.0;
int i, count = 0;
do{
a = ++count;
for(i = 0;i < 5; i++){
a = (5.0/4.0 * a) + 1;
}
}while((a - (int)a) > 10e-6);
printf("%.0lf %d\n",a,count);
return 0;
}