6 kyu
Compact polynomial
38 of 68Glushatov
Description:
Task
Consider an n-th-degree polynomial with integer coefficients:
Let's call this polynomial compact if it has only integer roots which are non-repeating and non-zero and is minimal.
Your task is to find the maximum and minimum values of in the compact polynomial.
You're given the degree of the polynomial: .
Return a tuple
(min, max).
Note
Test feedback is minimal as part of this puzzle.
Examples
first_coefficient(1) => (-1, 1)
Fundamentals
Puzzles
Mathematics
Similar Kata:
Stats:
Created | Jan 9, 2022 |
Published | Jan 9, 2022 |
Warriors Trained | 502 |
Total Skips | 76 |
Total Code Submissions | 967 |
Total Times Completed | 68 |
Python Completions | 38 |
C++ Completions | 19 |
C Completions | 17 |
JavaScript Completions | 19 |
Total Stars | 15 |
% of votes with a positive feedback rating | 86% of 32 |
Total "Very Satisfied" Votes | 25 |
Total "Somewhat Satisfied" Votes | 5 |
Total "Not Satisfied" Votes | 2 |
Total Rank Assessments | 17 |
Average Assessed Rank | 7 kyu |
Highest Assessed Rank | 6 kyu |
Lowest Assessed Rank | 8 kyu |