Physical Address
304 North Cardinal St.
Dorchester Center, MA 02124
Each contest – there are approximately 1500 – 2000 users who participate for the 1st time and get rated.
The Chef wanted to tell new users some tricks for their 1st contest:
Now to the problem:
In a contest where N new users visited the contest,
You need to output the number of new users in the contest who, after the contest, will get a rating and also the number of new users who will get a rating strictly greater than 1000.
Output two integers separated by a space in a single line – the number of new users who will get a rating at the end of the contest and the number of new users who will get a rating higher than 1000.
Input: 10 3 2
Output: 7 5
There were 10 new users. Among those 10, 3 didn’t make any submissions. This means that the other 10−3=7 users made submissions and will get a rating. This is the first integer of the output.
Now, among these 7 users, 2 couldn’t solve any problem even though they submitted and tried. So, they will get a rating less than equal to 1000. The other 7 – 2 = 5 users were able to solve at least 1 problem and hence will get a rating greater than 1000. Hence, the second integer of the output is 5.
Input: 10 4 1
Output: 6 5
There were 10 new users. Among those 10, 4 didn’t make any submissions. This means that the other 10 – 4 = 6 users made submissions and will get a rating. This is the first integer of the output.
Now, among these 6 users, 1 couldn’t solve any problem even though they submitted and tried. So, they will get a rating less than equal to 1000. The other 6 – 1 = 5 users were able to solve at least 1 problem and hence will get a rating greater than 1000. Hence, the second integer of the output is 5.
Input: 20 17
Output: 19 17
There were 20 new users. Among those 20, 1 didn’t make any submissions. This means that the other 20 – 1 = 19 users made submissions and will get a rating. This is the first integer of the output.
Now, among these 19 users, 2 couldn’t solve any problem even though they submitted and tried. So, they will get a rating less than equal to 1000. The other 19 – 2 = 17 users were able to solve at least 1 problem and hence will get a rating greater than 1000. Hence, the second integer of the output is 17.
Input: 1000 300 700
Output: 700 0
There were 1000 new users. Among those 1000, 300 didn’t make any submissions. This means that the other 1000 – 300 = 700 users made submissions and will get a rating. This is the first integer of the output.
Now, among these 700 users, 700 couldn’t solve any problem even though they submitted and tried. So, they will get a rating less than equal to 1000. The other 700 – 700 = 0 users were able to solve at least 1 problem and hence will get a rating greater than 1000. Hence, the second integer of the output is 0.
#include <iostream>
using namespace std;
int main() {
int N ,A,B;
cin>>N>>A>>B;
cout<<N-A<<" "<<N-A-B<<endl;
return 0;
}
n,a,b = map(int,input().split())
c = n-a
d = c-b
print(c, " ", d)
In our experience, we suggest you solve this My very 1st contest! CodeChef Solution and gain some new skills from Professionals completely free and we assure you will be worth it.
If you are stuck anywhere between any coding problem, just visit Queslers to get the My very 1st contest! CodeChef Solution
I hope this My very 1st contest! CodeChef Solution would be useful for you to learn something new from this problem. If it helped you then don’t forget to bookmark our site for more Coding Solutions.
This Problem is intended for audiences of all experiences who are interested in learning about Data Science in a business context; there are no prerequisites.
Keep Learning!
More Coding Solutions >>