Tutorial for a non-trivial problem. | non-trivial program
Hellopeople….Today,wearegoingtomakeourfirstnon-trivialprogramsubmission,andIamgoingtoguideyouthroughreadingtheproblemstatementthroughmakingasuccessfulsubmission.Iwillalsobetouchingtheissueof“timelimit”and“sourcelimit”inthistutorial.However,Iwon’tberevealingtoomuchintermsofcode,soyouwillstillhavetodothehardwork!I’llbeusingtheSmallFactorialsproblem[1]astheprogramdrivingthistutorial.Hereistheproblemstatement:Youareaskedtocalculatefactorialsofsomesmallpositiveintegers.Input:Anintegert,1<=t<...
Hello people…. Today, we are going to make our first non-trivial program submission, and I am going to guide you through reading the problem statement through making a successful submission. I will also be touching the issue of “time limit” and “source limit” in this tutorial. However, I won’t be revealing too much in terms of code, so you will still have to do the hard work!
I’ll be using the Small Factorials problem[1] as the program driving this tutorial.
Here is the problem statement:
You are asked to calculate factorials of some small positive integers.
Input:An integer t, 1<=t<=100, denoting the number of test cases, followed by t lines, each containing a single integer n, 1<=n<=100.
Output:For each integer n given at input, display a line with the value of n!
ExampleSample input:41253
Sample output:121206
Time limit: 1s
Source limit:2000B
The problem statement is fairly simple. We all recall tha...