trying and send to best pc

This commit is contained in:
Xamora 2024-12-11 07:08:50 +01:00
parent a656268da7
commit 83beca8152

View file

@ -38,7 +38,11 @@ int main(int argc, char **argv) {
}
long long count = lenght_struc(head);
for (int i = 0; i < 75; i++) {
long long pre_count = count;
long long estimate = count;
double average = 0;
int max = 40;
for (int i = 0; i < max; i++) {
cur = head;
for (int j = 0; cur->next != NULL; j++) {
if (cur->nbr == 0) {
@ -65,10 +69,19 @@ int main(int argc, char **argv) {
cur = cur->next;
}
}
//printf("count - pre_count: %f\n", (double)count / pre_count);
average += (double)count / pre_count;
pre_count = count;
}
average /= (double)max;
printf("average: %f\n", average);
for (int i = 0; i < 75; i++)
estimate *= average;
//print_struc(head);
printf("count: %lld\n", count);
printf("estimate: %lld\n", estimate);
return 0;