Codechef problems : New Year Resolution (NYRES)
Problem Statement:
To start the year off, Chef made a resolution to exercise daily. He decided to do exactly push-ups every day. If he sticks to his resolution, how many push-ups will he do in the month of January? Note that the month of January has 31 days.
Input Format
- The first and only line of input will contain a single integer , denoting the number of push-ups Chef does every day.
Output Format
Output a single integer: the number of push-ups Chef will do in January.
Constraints
1 <= X <= 100
Solution:
If the chef does daily x push-ups then in 31 days (of January) he will do 31*x pushups.
Code Solution:
#include <bits/stdc++.h>
using namespace std;
int main() {
int x;
cin >> x;
cout << 31 * x;
return 0;
}
Comments
Post a Comment