Codechef Problems: Conquer the Fest!! (CLSI)
Problem Statement:
Solution:
Given:
B: Difficulty level of the Problem
N: Contestant's IQ
Contestant can solve the problem only if N >= 10*B
so,
condition 1: N >= 10*B
output : YES
condition 2: N < 10*B
output: NO
Code Solution:
#include <bits/stdc++.h>
using namespace std;
int main() {
int b, n;
cin >> n >> b;
if (n >= 10 * b) {
cout << "YES" << endl;
} else {
cout << "NO" << endl;
}
return 0;
}
Comments
Post a Comment