Codechef Problems: Time Penalty (WAPEN)
Problem Statement:
Solution:
Given,
X - Time from the start of the contest
Y - Number of Incorrect Submissions
To find - Total Time Penalty for the problem
Total time penalty = time to solve the problem + Incorrect submission penalty
= X + ( 10 * Y )
Code Solution:
#include <bits/stdc++.h>
using namespace std;
int main() {
int x, y;
cin >> x >> y;
cout << x + 10 * y << endl;
return 0;
}
Comments
Post a Comment