,没啥好说的,把时间算出来比较就行

#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;
}