1776: 【CSP循环-穷举】买糕点▅

Memory Limit:128 MB Time Limit:1.000 S
Judge Style:Text Compare Creator:
Submit:4 Solved:4

Description

妈妈给了小明 lns="http://www.w3.org/1998/Math/MathML">n 元,给小明同学去面包店买糕点吃,小明非常喜欢吃切片面包和蛋挞,今天切片面包 lns="http://www.w3.org/1998/Math/MathML">x 元一件(一包),蛋挞 lns="http://www.w3.org/1998/Math/MathML">y 元一件(一盒);小明想花光 lns="http://www.w3.org/1998/Math/MathML">n 元买这两样糕点,而且每样都至少买一件,请问,小明可以采购的方案中,能够买最多面包的方案是什么?

比如,lns="http://www.w3.org/1998/Math/MathML">100 元,面包 lns="http://www.w3.org/1998/Math/MathML">15 元/件,蛋挞 lns="http://www.w3.org/1998/Math/MathML">10 元/件,那么可行的购买方案有:

lns="http://www.w3.org/1998/Math/MathML">2 件面包 lns="http://www.w3.org/1998/Math/MathML">7 件蛋挞

lns="http://www.w3.org/1998/Math/MathML">4 件面包 lns="http://www.w3.org/1998/Math/MathML">4 件蛋挞

lns="http://www.w3.org/1998/Math/MathML">6 件面包 lns="http://www.w3.org/1998/Math/MathML">1 件蛋挞

而上述方案中,面包最多的购买方案是: lns="http://www.w3.org/1998/Math/MathML">6 件面包 lns="http://www.w3.org/1998/Math/MathML">1 件蛋挞,因此输出:lns="http://www.w3.org/1998/Math/MathML">6 lns="http://www.w3.org/1998/Math/MathML">1

Input

三个变量:lns="http://www.w3.org/1998/Math/MathML">n lns="http://www.w3.org/1998/Math/MathML">x lns="http://www.w3.org/1998/Math/MathML">y,分别代表总金额,面包的单价和蛋挞的单价!

Output

两个数,分别代表采购方案中能够买到最多面包的件数和蛋挞的件数!

Sample Input Copy

100 15 10

Sample Output Copy

6 1