Spam filter accuracy drop alert

Write codeMedium14 minMeta and Google style

Your task

Your on-call runbook pages the ML team when a spam filter's weekly accuracy drops too far. Each week is summarized as [correct, total] with total >= 1. Accuracy dropped too far when acc_a - acc_b > max_drop_pct / 100, where acc_a = correct_a / total_a is last week and acc_b is this week. Check this exactly with integers: return true when 100 * (correct_a * total_b - correct_b * total_a) > max_drop_pct * total_a * total_b, else false. Do not use floating point. Example: week_a = [90, 100], week_b = [80, 100], max_drop_pct = 5 returns true (a 10-point drop).

Examples

accuracy_dropped(week_a: list[int], week_b: list[int], max_drop_pct: int) -> bool
Example 1
Inputaccuracy_dropped([90, 100], [80, 100], 5)
OutputTrue