In a school's
, they planned to take a tree-plantation event.
They have " " for planting. The of the school tells that if they decide to plant them in ' ' rows, then ' ' remain. The following table shows the values of and as seen by the teacher.
Teacher asks the students to find the number of plants, i.e.
Can you help the students by telling what is the , if it is the smallest to satisfy the above property ?
Most probably, after you get the answer, you'll say "It's indeed a huge movement to 'Go green', so many plants ! "
This section requires Javascript.
You are seeing this because something didn't load right. We suggest you, (a) try
refreshing the page, (b) enabling javascript if it is disabled on your browser and,
finally, (c)
loading the
non-javascript version of this page
. We're sorry about the hassle.
The number theory approach uses the repeated application of Chinese Remainder Theorem and is similar to the solution i wrote here
But I just started learning programming by self study, so here is the python code that prints the number directly.
Hence the answer is 6 3 4 6 4