For this Question: Sara has N <b>even</b> numbers with her in which all even numbers from <i>2</i> to<i> N</i> appear exactly <b>once</b> except for one number which appears exactly K times. Given the sum of all the numbers S, N, and K, your task is to find the repeated number.The input contains two space-separated integers N, K, and S.

Constraints:-
1 <= N, S <= 1000000
2 <= K <= 100000Print the repeated number, it is guaranteed that for the given test case there exists a set of numbers that fulfill the given conditions.Sample Input:-
5 3 14

Sample Output:-
4

Explanation:-
numbers:- {2, 4, 4, 4}

Sample Input:-
10 5 38

Sample Output:-
2, I have written this Solution Code: #include <bits/stdc++.h>
using namespace std;

int main() {
 int n,k,x;
 cin>>n>>k>>x;
 n/=2;
int res=n*(n+1);
 x-=res;
 x/=(k-1);
 cout<<x;
}, In this Programming Language: C++, Now tell me if this Code is compilable or not?