Sign-up forecast MSE

Write codeEasy10 minMeta style

Your task

A growth team's model forecasts daily sign-ups, and the eval report penalizes big misses much more than small ones by using squared error. Given non-empty equal-length integer lists y_true (actual sign-ups) and y_pred (forecasts), compute the sum of (y_true[i] - y_pred[i])^2 over all days, divide by the number of days, and return the result rounded down to an integer. Example: y_true = [100, 200], y_pred = [110, 190] gives (100 + 100) / 2 = 100.

Examples

squared_error_floor(y_true: list[int], y_pred: list[int]) -> int
Example 1
Inputsquared_error_floor([100, 200], [110, 190])
Output100