Need help with code! | Sololearn: Learn to code for FREE!
Nouvelle formation ! Tous les codeurs devraient apprendre l'IA générative !
Essayez une leçon gratuite
+ 1

Need help with code!

Hi, Im doing a small code for school and wanted to ask if the community could help me improve my coding. I am not very far with coding, so if somebody could show me a code that can take away the Time limit exedded thing and put numbers next to the results. All help is thanked for. Thanks.

7th Jun 2017, 1:15 AM
Joshua Fox
Joshua Fox - avatar
8 Réponses
+ 6
time limit exceeded is a server thing. it can not be bypassed here. you will have to run longer codes on your computer to see the results. Now that I have got that out of the way I will take a look at the code ☺
7th Jun 2017, 1:19 AM
jay
jay - avatar
+ 6
@Um-- yeah not typing that. lol just a turn of phrase. Cause I have a thing about doing others homework for them.
7th Jun 2017, 1:55 AM
jay
jay - avatar
+ 5
To make it as you want it you will need to get the info from the user using cin here is an example of using cin int baseNumber; cin >> baseNumber;
7th Jun 2017, 1:22 AM
jay
jay - avatar
+ 5
->I usually don't do homework.... I guess you are lucky today. https://code.sololearn.com/co2TpXw7mu53/#cpp
7th Jun 2017, 1:38 AM
jay
jay - avatar
+ 4
so reduce the limit of the loop...remove 1000 or increase the inrement value(change 66 to 100)....
7th Jun 2017, 1:37 AM
‹Um@›M@hesw@r
‹Um@›M@hesw@r - avatar
+ 4
y lucky ...@jay
7th Jun 2017, 1:52 AM
‹Um@›M@hesw@r
‹Um@›M@hesw@r - avatar
7th Jun 2017, 1:15 AM
Joshua Fox
Joshua Fox - avatar
+ 1
It doesn't have errors, it runs well xD
7th Jun 2017, 1:19 AM
Andrés04_ve
Andrés04_ve - avatar