{"raw_statement":[{"iden":"background","content":"对应的选择、判断题：<https://ti.luogu.com.cn/problemset/1122>"},{"iden":"statement","content":"“百鸡问题”是出自我国古代《张丘建算经》的著名数学问题。大意为：\n> “每只公鸡 $5$ 元，每只母鸡 $3$ 元，每 $3$ 只小鸡 $1$ 元；现在有 $100$ 元，买了 $100$ 只鸡，共有多少种方案？”\n\n小明很喜欢这个故事，他决定对这个问题进行扩展，并使用编程解决：如果每只公鸡 $x$ 元，每只母鸡 $y$ 元，每 $z$ 只小鸡 $1$ 元；现在有 $n$ 元，买了 $m$ 只鸡，共有多少种方案？"},{"iden":"input","content":"输入一行，包含五个整数，分别为问题描述中的 $x$，$y$，$z$，$n$，$m$。约定 $1 \\le x,y,z \\le 10$，$1 \\le n,m \\le 1000$。"},{"iden":"output","content":"输出一行，包含一个整数 $C$，表示有 $C$ 种方案。"},{"iden":"note","content":"【样例 1 解释】\n\n这就是问题描述中的“百鸡问题”。$4$ 种方案分别为：\n- 公鸡 $0$ 只、母鸡 $25$ 只、小鸡 $75$ 只。\n- 公鸡 $4$ 只、母鸡 $18$ 只、小鸡 $78$ 只。\n- 公鸡 $8$ 只、母鸡 $11$ 只、小鸡 $81$ 只。\n- 公鸡 $12$ 只、母鸡 $4$ 只、小鸡 $84$ 只。"}],"translated_statement":null,"sample_group":[["5 3 3 100 100","4"],["1 1 1 100 100","5151"]],"show_order":[],"formal_statement":null,"simple_statement":null,"has_page_source":false}