!Hasan

TimeLimit: Unknown ms  MemoryLimit:262144KB
64-bit integer IO format:%I64d
未提交 | 登录后收藏
Problem Description

Input/Output: standard input/output

Mixed Dimensions Onsite Round will host N contestants this year.

Moath and Saif have been preparing the contest hall, Moath needs X minutes to set up a computer for the contest, while Saif needs Y minutes to set up a computer. Each one of them works separately on one computer at a time.

Hasan is concerned they won't finish setting up the PCs in time, can you help Hasan figure out the minimum time required by Moath and Saif to set up all N PCs for the contest?

Input

The input contains 3 integers, N, X, and Y (1 ≤ N, X, Y ≤ 109), the number of PCs to set up, the amount of minutes Moath needs to set up a computer, and the amount of minutes Saif needs to set up a computer, respectively.

Output

On a single line, print one integer, the minimum number of minutes required by Moath and Saif to set up all the PCs for the contest.

SampleInput
100 10 1
SampleOutput
91
Submit
题目统计信息详细
总AC数9
通过人数9
尝试人数11
总提交量20
AC率45.00%
AC该题后可以添加标签
贴完标签可以获得20ACB。
并且可以获得本题所有提交代码查看权限。
点击标题可以显示标签。
如果你还没认真思考过这题,请不要查看标签
如果您已经通过了该题,请务为该题贴上标签

T^T Online Judge

[BUG反馈] [FAQ] [闽ICP备17026590号-1]
当前版本:3.24 系统时间: