Go green, plant trees

In a school's Go Green movement \color{#20A900}{\textbf{Go Green movement}} , they planned to take a tree-plantation event.

They have " k \color{#69047E}{k} " plants \color{#20A900}{\text{plants}} for planting. The math teacher \color{#D61F06}{\text{math teacher}} of the school tells that if they decide to plant them in ' x x ' rows, then ' y y ' plants \color{#20A900}{\text{plants}} remain. The following table shows the values of x x and y y as seen by the teacher.

x y 17 3 19 4 23 7 29 12 \color{#3D99F6}{ \begin{array}{|c||c|} x & y \\ \hline 17&3\\ 19&4\\ 23&7\\ 29&12\\ \end{array} }

Teacher asks the students to find the number of plants, i.e. k \color{#69047E}{k}

Can you help the students by telling what is the positive integer \color{#3D99F6}{\text{positive integer}} k \color{#69047E}{k} , 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 ! "


The answer is 63464.

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.

3 solutions

Aditya Raut
Aug 5, 2014

The number theory approach uses the repeated application of Chinese Remainder Theorem \textbf{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.

img img

Hence the answer is 63464 \boxed{63464}

222222222 Trivial By Python, LOL

Dinesh Chavan - 6 years, 10 months ago

Log in to reply

Yeah, too much, 3 much, 4 much..... trivial !

Aditya Raut - 6 years, 10 months ago

I've started to hate CRT after this!!!!!!!!!!!!!!!!! Aaaaaaaaaaaaaaaaaaaaarghhhhhhhhhhhhhh!!!!!!!!!!!

Krishna Ar - 6 years, 8 months ago

Was this movement taken up in your school ????? :-)

Parth Bhardwaj - 6 years, 3 months ago

cud anyone say wat is the way to solve the prob other than the comp. coding .....

Ganesh Ayyappan - 6 years, 5 months ago
Parth Bhardwaj
Feb 28, 2015

I also used the chinese remainder theorem.And got 63464.

Vaibhav Borale
Aug 5, 2014

I used Turbo C code simply!!!!!

Void main()

{ long int i;

int a,b,c,d;

a=3;b=4;c=7;d=12;

for(i=1;1<100000;i++)

{

      if(i%17==a)
        {if( i%19==b )
           {if( i%23==c )
              {if( i%29==d)

        { printf("Required number is %lu",i); }

                }
             }
          }

}

getch(); }

i too solved it the same way :D

void main()

{
    long i=0,k=0;
    do
    {
    i++;
    if(i%17==3 &  i%19==4 & i%23==7 &  i%29==12)
    k=i;
    }
    while(k==0);
    cout<<k; 
    }

Sagar Gupta - 6 years, 10 months ago

0 pending reports

×

Problem Loading...

Note Loading...

Set Loading...