题解 | #小杜要迟到了!#
小杜要迟到了!
https://ac.nowcoder.com/acm/problem/247419
#include <bits/stdc++.h>
using namespace std;
int main()
{
int n,k,a,b;
cin >> n >> k >> a >> b;
int sum1 = b * (k - 1) + (n - 1) * b;
int sum2 = a * (n - 1);
if(sum1 < sum2) cout << 1 ;
else if(sum1 > sum2) cout << 2 ;
else cout << 0 ;
return 0;
}