### Post by svajoklis on May 19, 2020 8:06:10 GMT -5

Welcome to week 3!

First - quick note about the score. The way I try to tally it up is that I add your new score to your old score and then put you at the end of the list of people with same score. That way people who scored more earlier are prioritized.

Now for your submissions:

Rod's solution got 5/9 test cases provided right, so it results in a score of 0.55. Tenochtitlanuk added a brute force-like solution, so as I previously mentioned it would get a 0.1. Since it does a bit of heuristics to determine at least the range of numbers to check, so I bumped it up to 0.2. (Let me know if you think the score should be adjusted, I don't want to be the sole judge here!) Timur77 submitted two solutions that both worked well. Sorry, but I only have a single point to give out! I checked the last one and it passed all the tests. Thanks again for the extra test cases. I think I will do the same thing this week where I post only a few test cases initially and as the week goes along I'll try to post more just to keep you on the edge to find possible bugs you might have missed.

I'll go ahead with an another olympiad level task this week. Let me know if they are maybe too hard and you want something easier like the week #1 task. I think olympiad tasks are more interesting, since with tasks like the #1 task it's more about finding the "trick" behind it and exploiting it, where here it's more of a creative task.

You are given a list of natural numbers that are known to belong to a geometric progression. Natural numbers are numbers that are whole and larger than 0. Geometric progression is a sequence of numbers, where each next element after the first is the product of previous element and the common ratio. Find a geometric progression, that has all the numbers in a given set, if the common ratio can only be a whole number. Print out the common ratio of the sequence. If there can be more than one possible common ratio, print the highest one. Also print all found geometric progression members starting with the lowest given and ending with the highest given.

Good luck!

libertybasiccom.proboards.com/thread/1068/weekly-liberty-basic-challenge-2

First - quick note about the score. The way I try to tally it up is that I add your new score to your old score and then put you at the end of the list of people with same score. That way people who scored more earlier are prioritized.

Now for your submissions:

Rod's solution got 5/9 test cases provided right, so it results in a score of 0.55. Tenochtitlanuk added a brute force-like solution, so as I previously mentioned it would get a 0.1. Since it does a bit of heuristics to determine at least the range of numbers to check, so I bumped it up to 0.2. (Let me know if you think the score should be adjusted, I don't want to be the sole judge here!) Timur77 submitted two solutions that both worked well. Sorry, but I only have a single point to give out! I checked the last one and it passed all the tests. Thanks again for the extra test cases. I think I will do the same thing this week where I post only a few test cases initially and as the week goes along I'll try to post more just to keep you on the edge to find possible bugs you might have missed.

I'll go ahead with an another olympiad level task this week. Let me know if they are maybe too hard and you want something easier like the week #1 task. I think olympiad tasks are more interesting, since with tasks like the #1 task it's more about finding the "trick" behind it and exploiting it, where here it's more of a creative task.

*Weekly Challenge problem #3:***Geometric progression**[level: olympiad]You are given a list of natural numbers that are known to belong to a geometric progression. Natural numbers are numbers that are whole and larger than 0. Geometric progression is a sequence of numbers, where each next element after the first is the product of previous element and the common ratio. Find a geometric progression, that has all the numbers in a given set, if the common ratio can only be a whole number. Print out the common ratio of the sequence. If there can be more than one possible common ratio, print the highest one. Also print all found geometric progression members starting with the lowest given and ending with the highest given.

**Note:**follow the task input and output formats__exactly__with no extraneous characters. Your program should be able to handle multiple sets as displayed below. This lets you immediately test multiple cases with a single run of the program.**Data format:**File "challenge3_data.txt". First line specifies how many sets of numbers there will be (1 <= n <= 10). Subsequent lines consist of the size of the single number set you are given (2 <= m <= 10), rest of the numbers on the line are numbers of the set.**Output:**Print your results on the screen.**Example:**Input (challenge3_data.txt) | Output (screen) |

2 3 128 8 512 4 1500 300 37500 12 | ratio = 4 8 32 128 512 ratio = 5 12 60 300 1500 7500 37500 |

4 3 1 4 32 3 7 28 224 3 7 112 7168 3 1 6 216 | ratio = 2 1 2 4 8 16 32 ratio = 2 7 14 28 56 112 224 ratio = 4 7 28 112 448 1792 7168 ratio = 6 1 6 36 216 |

2 4 82055753 37349 17 485537 3 7 45927 413343 | ratio = 13 17 221 2873 37349 485537 6311981 82055753 ratio = 9 7 63 567 5103 45927 413343 |

Good luck!

**Previous week's challenge:**libertybasiccom.proboards.com/thread/1068/weekly-liberty-basic-challenge-2

**Hall of Fame:**Total score | Score in last task | ||
---|---|---|---|

timur77 | 2 | 1 | |

svajoklis | 2 | 1 | |

Rod | 1.55 | 0.55 | |

tenochtitlanuk | 1.2 | 0.2 |