#include <iostream> #include <cstdio> #include <cstring> #include <algorithm> using namespace std; int main() { long long int a,b,w,x,c; scanf("%I64d%I64d%I64d%I64d%I64d",&a,&b,&w,&x,&c); if(c<=a) { puts("0"); return 0; } long long ans=(a*w-c*w+b)/(x-w); if(abs(ans*(x-w))<abs(a*w-c*w+b)) ans++; printf("%I64d\n",ans); return 0; }
相关文章
- 11-03B. Long Number--读题的重要性--Codeforces Round #555 (Div. 3)
- 11-03Codeforces Round #104 (Div. 1) B. Lucky Number 2
- 11-03Codeforces 382B Number Busters(数论)
- 11-03Codeforces 382 B. Number Busters
- 11-03B. The Number of Products(Codeforces Round #585 (Div. 2))
- 11-03Codeforces Beta Round #51 B. Smallest number dfs
- 11-03Codeforces Round #427 (Div. 2) B. The number on the board