```python a, b, k, n, m = map(int, input().split()) # calculates binomial coefficient def binomial_coefficient(n, m): res = 1 for i in range(m): res = res * (n - i) // (i + 1) return res # calculates coefficient of x^n * y^m term coefficient = binomial_coefficient(k, n) * an * bm % 10007 print(coefficient) ``` [2024-12-05 20:31:25 | AI写代码神器 | 228点数解答]