CF1570B Yellow Cards

题目描述

#### 题目概要 一场足球赛中,第一队有a1个球员,其中的每一个球员收到k1张黄牌,将会被罚下场。第二队有a2个球员,其中的每一个球员收到k2张黄牌,将会被罚下场。以被罚下场的球员不能再接受黄牌。 即使一整队(甚至两队)的球员全被罚下场,比赛依旧继续。 现在知道裁判罚了n张黄牌,问被罚下的球员的最多和最少数量。 #### 重要提醒 本题仅可提交Kotlin代码!!!

输入格式

五行,一行一个整数,分别为a1,a2,k1,k2,n。

输出格式

一行分别为被罚下场球员的最小值和最大值。

说明/提示

In the first example it could be possible that no player left the game, so the first number in the output is $ 0 $ . The maximum possible number of players that could have been forced to leave the game is $ 4 $ — one player from the first team, and three players from the second. In the second example the maximum possible number of yellow cards has been shown $ (3 \cdot 6 + 1 \cdot 7 = 25) $ , so in any case all players were sent off.