No testdata at current.
No submission language available for this problem.
有两个数 m 和 n 。 m 的初始值由输入的第一个数给出, n 的初始值为 0 。每次将 m 加上 a ,将 n 加上 b ,求 m 在经过多少次操作后能使 m≤cn 。如果目标无法实现,请输出 −1 。输入:一行四个整数 m,a,b,c ;输出:目标可以实现输出题目答案,否则输出 −1 。
输入的数据均为整数
A B C D
输出一个整数
5 2 3 2
2
6 9 2 3
-1
By signing up a 西蒙科教 universal account, you can submit code and join discussions in all online judging services provided by us.