PROBLEM LINK:
Contest Division 1
Contest Division 2
Contest Division 3
Contest Division 4
Setter: Hrishikesh
Tester: Harris Leung
Editorialist: Trung Dang
DIFFICULTY:
264
PREREQUISITES:
None
PROBLEM:
Our Chef is currently practicing on CodeChef and is a beginner. The count of ‘All Problems’ in the Beginner section is X. Our Chef has already ‘Attempted’ Y problems among them. How many problems are yet ‘Un-attempted’?
EXPLANATION:
Answer is X - Y.
TIME COMPLEXITY:
Time complexity is O(1).
SOLUTION:
Setter's Solution
//tt89 ;)
#include <iostream>
using namespace std;
int x,y;
int main() {
// your code goes here
cin>>x>>y;
cout<<x-y<<"\n";
return 0;
}
Tester's Solution
#include<bits/stdc++.h>
using namespace std;
typedef long long ll;
#define fi first
#define se second
ll n;
void solve(int rr){
cin >> n;
int ans=0;
for(int i=1; i<=n ;i++){
int x;cin >> x;ans+=(x>=1000);
}
cout << ans << '\n';
}
int main(){
ios::sync_with_stdio(false);cin.tie(0);
ll x,y;cin >> x >> y;
cout << x-y << '\n';
}
Editorialist's Solution
#include <bits/stdc++.h>
using namespace std;
int main() {
ios_base::sync_with_stdio(false);
cin.tie(nullptr);
int a, b; cin >> a >> b; cout << a - b;
}