86
points
Questions
0
Answers
5
-
/*
Yep Thats Perfect!
Following is a java program to do the same thing.
*/
class k1{
public static int[] factorize (int a[], int p)
{
int count=0,no=p;
int b[]= new int[a.length];
b=a;
for(int i=2;i<=p;i++)
if(p%i==0){b[count++]=i;}
b[count++]=1;
return b;
}public static int no_of_factors(int b[])
{
int counter=0;
for(int i=0;i<b.length-1;i++)
{
if(b[i+1]!=b[i]&&b[i]!=0) counter++;
}
return counter;
}public static void main(String args[])
{
int on_count=0;
int a[]= new int[50];
for(int i=1;i<=1000;i++)
{
factorize(a,i);
int x = no_of_factors(a);
if(x%2!=0) on_count++;
for(int j=0;j<50;j++)a[j]=0;
}System.out.print(on_count);
}// end of main
}// end of class- 4251 views
- 2 answers
- 1 votes
-
41%(2+6)=41%(4+6)=1
52%(3+7)=52%(6+4)=2Hence the middle no should be such that it will give the same remainder when divided by 8 and 12 both.
Hence 75 is the answer as it is the only number which satisfies this criteria.- 9750 views
- 1 answers
- 1 votes
-
You don’t even need two ropes.
Just have one rope.
Fold it into half.
And Light it from both the ends simultaneously!
It will take fifteen minutes for the rope to burn.- 6875 views
- 2 answers
- 0 votes
-
30 = 11+9+3+1+3!
3!=3*2*1=6
- 10487 views
- 3 answers
- 0 votes
-
They both are standing with their backs faced against one another.
So from Bravo’s frame of reference, Andrew is behind him.
And from Andrew’s frame of reference Bravo is behind him at the same time.Otherwise you could consider Bravo and Andrew standing on opposite vertices of a diameter of a circle and a person viewing Bravo and Andrew while himself travelling in a circular fashion w.r.t them will feel Bravo is behind Andrew. O no wait! Andrew is Behind Bravo; but again Bravo is behind Andrew and so on!
This answer accepted by SherlockHolmes. on 12th November 2015 Earned 20 points.
- 4962 views
- 3 answers
- 1 votes