0
why some test cases are failing?
Question:- https://www.codingninjas.com/codestudio/problems/sum-of-even-numbers-till-n_893205?leftPanelTab=0 This is my Approach:- https://code.sololearn.com/cJPuH6M1FIfo/#py
9 Réponses
+ 3
Now, you need to change your first if statement to a loop to run it x times.
+ 2
#include <iostream>
using namespace std;
int main() {
int count = 300; // letter in a minute
int time;
cin >> time;
//your code goes here
time *= 300;
cout << count << endl;
return 0;
}
Please fix it for me
+ 1
Jay Matthews can you please tell where I’m doing mistake in my approach
+ 1
Simba no this one is different. Is that question opening now? Please check
+ 1
Try this
I'm re writing your code
https://code.sololearn.com/cc6aP4scgS0d/?ref=app
+ 1
Jay Matthews Simba Non Stop Coding I have updated my approach its working now. I was taking the test case input also which was not necessary
+ 1
Jamilu Abubakar Sadiq
Are you trying to print how many letters you can write within a given time ?
Instead of printing variable " count "
You should be printing " time "
Because you are multiplying input time by 300. // Letters per minute
So, cout << time << endl;
+ 1
US22
What is your approach ?
Please share🤗🤗
I want to know because I like watching different ways of solving a single problem👍