# All Activity

1. Today
2. Yesterday
3. ## A bug problem

int no_of_happy_bug(int gen) { int happy = 1; int sad = 0; int neutral = 0; int generation = 1; while (generation <= gen) { int h = 0; int s = 0; int n = 0; if (happy >= 1) { s = s + happy; n = n + happy; } if (sad >= 1) { h = h + (2 * sad); } if (neutral >= 1) { h = h + neutral; s = s + neutral; } happy = h; sad = s; neutral = n; generation++; } return happy; }
4. Last week
5. ## Interview Puzzle- "Fox in a hole"

Exception which means it could be 4 check hole 2 fox is in 5 check hole 3 fox is in 4 check hole 4 fox is in 3 check hole 2 fox is back in 4
6. ## Interview Puzzle- "Fox in a hole"

I think that after we check 4, we know that fox is in an odd number right now, and will move to an even one that night.
7. ## Interview Puzzle- "Fox in a hole"

The second half of the solution seems to be inefficient though. Once we stop at hole 4 and conclude that the fox is in fact at an even hole the only hole left is hole number 2 which means that we don't need to start all over. Simply inspecting three and then two would be enough to find the fox.
8. ## exponential help

not without assuming something about the population.
9. ## A bug problem

For a particular bug population, a bug is either classified as happy, sad, or neutral. For each generation, all happy bugs birth 1 sad and 1 neutral bug. all sad bugs birth 2 happy bugs all neutral bugs birth one happy bug and one sad bug all birthing bugs die after birthing. No bug lives more than one generation and birth at the same time. These bugs do not require mating to reproduce. The initial generation only consists of one happy bug. Write an explicit function to determine for the nth generation how many happy bugs there are.
10. Earlier
11. ## Interview Puzzle- "Fox in a hole"

Don't watch the video!!! it is a good video, it clearly states the problem, but then it gives the answer! (Clearly stated as well) if you watch the video, stop after the problem statement. I enjoy the problem, and I appreciated the ingenious solution, nice job!

13. ## Thinking of a Number

Silently be in doubt and subtle...
14. ## Lychrel

import java.util.*; public class lychrel { public static long palin(long n) { long m,p=0; while(n>0) { m=n%10; p=(p*10)+m; n=n/10; } return p; } public static void main(String ar[]) { long a,l,i,j=0,t,it=0; Scanner v=new Scanner(System.in); a=v.nextInt(); l=a+palin(a); t=palin(l); for(i=1;i<=10;i++) { it++; if(l==t) break; else { l=l+palin(l); t=palin(l); } if(i==4) j=l; } if(l!=t) { System.out.println(a+" is a Lychrel Number"); System.out.println("5th iteration of number "+a+" is "+j); } else System.out.println(it); } }
15. ## Thinking of a Number

Mind explaining how exactly the answer counts as a number? I still don't get it.
16. ## Thinking of a Number

That is the number I am thinking of !

18. ## Distance Echo 2017

What is the distance and how? https://www.flickr.com/photos/153009216@N05/albums/72157681733970625

20. ## exponential help

I have no idea dude Maths has never been my scope of interest and I cannot help you with composing equation. What if you address the right people who can help you with it. It is unlikely that you will get answer on the forums.
21. ## Submitted for your perusal

This is either sheer madness or complete brilliance. It's a lot to read, and I've only briefly skimmed it because i don't know if I have that much time to dedicate to it, but I've definitely noticed a number things out of this that will start to relate each of the paragraphs and "poems" together as well as a number of random pieces of information. A few examples I found: It ends with an Irish Blessing (although it is missing the final piece: "May God hold you in the palm of His hand.") There is an entire section containing pieces of song lyrics (Lou Reed - Walk on the Wild Side, Leonard Cohen - The Future, Simon and Garfunkle - The sound of Silence, Schoolhouse Rock - Conjunction Junction, The Trashmen - Surfin Bird, Gorillaz - Empire Antz, Tom Petty and the Heartbreakers - Runnin' Down the Dream, etc) There are repeated phrases or words that seem too coincidental across the paragraphs ("Four Seconds", "Military Bases", "Capital G God", etc) So, again, I'm not going to have time to spend digging into this, and i'm still not completely sure if it's actually worthwhile, but it definitely piques my interest and will be checking in on this one...
22. ## Palindromes by multiplication

Yes, this can be proven. The proof is relatively simple but it does require knowledge of Euler's theorem and Euler's totient function (See https://en.wikipedia.org/wiki/Euler's_theorem) The proof consists of 3 steps and constructs an explicit palindrome for every number n that is not divisible by 10. This will be a possible solution, but by no means the smallest palindrome divisible by n. In fact the constructed palindrome get very large. 1) Find a solution for n=2k or n=5k for every integer k=1,2,3,.... 2) Find a solution for any value of n that does not contain a factor 2 or 5 3) Find a solution for any value of n that does contain a factor 2 or 5
23. ## Point A to Point B?

Travel from Point A to Point B with out a Map? Any Ideas? Thanks. https://www.flickr.com/photos/153009216@N05/albums/72157678397870123

25. ## Brain Teaser

Question: How would the following be done? Ask:What additional data would help better this? You can view here: https://www.flickr.com/photos/153009216@N05/albums/72157679628458322
26. ## Christopher Sarbaugh 8x8x8 Cube Maze

Hi, I've been trying to find this puzzle for a long time. I finally found how it's called but there is no place to buy, if anyone knows, I'll be grateful to let me know where to buy. Thanks in advance

kilometre
28. ## Thinking of a Number

A good guess... but that is not the number I am thinking of. The number I am thinking of is only one word.

one eleven