Language: C++

#include <bits/stdc++.h>

using ll = ll;
using namespace std;

ll n,a,b,k,ans = 0;
ll mod = 998244353;

ll fact[1000000];

ll extgcd(ll a,ll b,ll& x,ll& y){
	ll d = a;
	if(b != 0) {
		d = extgcd(b,a%b,y,x);
		y -= (a/b) * x;
	}else{
		x = 1; y = 0;
	}
	return d;
}

ll mod_inverse(ll a,ll m){
	ll x,y;
	extgcd(a,m,x,y);
	return (m + x % m) % m;
}

ll mod_fact(ll n,ll p ,ll& e){
	e = 0;
	if(n == 0) return 1;
	ll res = mod_fact(n/p,p,e);
	if(n/p%2 != 0 ) return res * (p - fact[n%p]) % p;
	return res *fact[n%p] % p;
}

ll mod_comb(ll n,ll k,ll p) {
	if(n < 0 || k < 0 || n < k) return 0;
	ll e1,e2,e3;
	ll a1 = mod_fact(n,p,e1), a2 = mod_fact(k,p,e2), a3 = mod_fact(n-k,p,e3);
	if(e1 > e2 + e3) return 0;
	return a1 * mod_inverse(a2 * a3 % p,p) % p;
}

int main() {
	cin.tie(0);
	ios::sync_with_stdio(false);

	cin >> n >> a >> b >> k;

	ll g = a+b;

	fact[0] = 0;
	fact[1] = 1;

	for (ll i = 2;i < 1000000;i++){
		fact[i] = (fact[i-1] * i) % mod;
	}

	for(ll i = 0;i<=n;i++){
		if(i > n) break;
		ll c = k - i*a;
		if(c%b == 0){
			ll j = c/b;
			ans += (mod_comb(n,i,mod)*mod_comb(n,j,mod))%mod;
			ans %= mod;
		}

	}

	cout << ans << endl;

	return 0;

}

Compiler output:
a.cc:3:12: error: 'll' does not name a type
    3 | using ll = ll;
      |            ^~
a.cc:6:1: error: 'll' does not name a type
    6 | ll n,a,b,k,ans = 0;
      | ^~
a.cc:7:1: error: 'll' does not name a type
    7 | ll mod = 998244353;
      | ^~
a.cc:9:1: error: 'll' does not name a type
    9 | ll fact[1000000];
      | ^~
a.cc:11:1: error: 'll' does not name a type
   11 | ll extgcd(ll a,ll b,ll& x,ll& y){
      | ^~
a.cc:22:1: error: 'll' does not name a type
   22 | ll mod_inverse(ll a,ll m){
      | ^~
a.cc:28:1: error: 'll' does not name a type
   28 | ll mod_fact(ll n,ll p ,ll& e){
      | ^~
a.cc:36:1: error: 'll' does not name a type
   36 | ll mod_comb(ll n,ll k,ll p) {
      | ^~
a.cc: In function 'int main()':
a.cc:48:16: error: 'n' was not declared in this scope; did you mean 'yn'?
   48 |         cin >> n >> a >> b >> k;
      |                ^
      |                yn
a.cc:48:21: error: 'a' was not declared in this scope
   48 |         cin >> n >> a >> b >> k;
      |                     ^
a.cc:48:26: error: 'b' was not declared in this scope
   48 |         cin >> n >> a >> b >> k;
      |                          ^
a.cc:48:31: error: 'k' was not declared in this scope
   48 |         cin >> n >> a >> b >> k;
      |                               ^
a.cc:50:9: error: 'll' was not declared in this scope
   50 |         ll g = a+b;
      |         ^~
a.cc:52:9: error: 'fact' was not declared in this scope
   52 |         fact[0] = 0;
      |         ^~~~
a.cc:55:16: error: expected ';' before 'i'
   55 |         for (ll i = 2;i < 1000000;i++){
      |                ^~
      |                ;
a.cc:55:23: error: 'i' was not declared in this scope
   55 |         for (ll i = 2;i < 1000000;i++){
      |                       ^
a.cc:56:45: error: 'mod' was not declared in this scope; did you mean 'modf'?
   56 |                 fact[i] = (fact[i-1] * i) % mod;
      |                                             ^~~
      |                                             modf
a.cc:59:15: error: expected ';' before 'i'
   59 |         for(ll i = 0;i<=n;i++){
      |               ^~
      |               ;
a.cc:59:22: error: 'i' was not declared in this scope
   59 |         for(ll i = 0;i<=n;i++){
      |                      ^
a.cc:61:19: error: expected ';' before 'c'
   61 |                 ll c = k - i*a;
      |                   ^~
      |                   ;
a.cc:62:20: error: 'c' was not declared in this scope
   62 |                 if(c%b == 0){
      |                    ^
a.cc:63:27: error: expected ';' before 'j'
   63 |                         ll j = c/b;
      |                           ^~
      |                           ;
a.cc:64:25: error: 'ans' was not declared in this scope; did you mean 'abs'?
   64 |                         ans += (mod_comb(n,i,mod)*mod_comb(n,j,mod))%mod;
      |                         ^~~
      |                         abs
a.cc:64:46: error: 'mod' was not declared in this scope; did you mean 'modf'?
   64 |                         ans += (mod_comb(n,i,mod)*mod_comb(n,j,mod))%mod;
      |                                              ^~~
      |                                              modf
a.cc:64:33: error: 'mod_comb' was not declared in this scope
   64 |                         ans += (mod_comb(n,i,mod)*mod_comb(n,j,mod))%mod;
      |                                 ^~~~~~~~
a.cc:64:62: error: 'j' was not declared in this scope; did you mean 'jn'?
   64 |                         ans += (mod_comb(n,i,mod)*mod_comb(n,j,mod))%mod;
      |                                                              ^
      |                                                              jn
a.cc:70:17: error: 'ans' was not declared in this scope; did you mean 'abs'?
   70 |         cout << ans << endl;
      |                 ^~~
      |                 abs