First of all, thanks for reading (http://www.java-gaming.org/)

i am trying to register on one java forum, but i can't pass the quiz... i know it's probably simple, but i really need some help, here are the questions

In which year did Albert Einstein pass away?

Please take a look at this code:

  int h = 2;
  int o = "QDL".hashCode() % 3000;
  int y = "KWZ".hashCode() % 3000;
  for (int x = 0; x <= y; x++)
     h = (h ^ x) % o;
  return h;

What is the returned value?

What is the greatest common divisor of the previous two results?

Thanks alot, everyone!

1 decade ago*

Comment has been collapsed.

You probably shouldn't be joining if you can't answer these yourself.

1 decade ago
Permalink

Comment has been collapsed.

+1

There is a reason why they have this..

1 decade ago
Permalink

Comment has been collapsed.

i only need 1 thread and i can leave it forever if i have to, please help me out a bit

1 decade ago
Permalink

Comment has been collapsed.

Deleted

This comment was deleted 1 year ago.

1 decade ago
Permalink

Comment has been collapsed.

Only because I am bored I will help.

Lets break it down. When did Albert Einstein pass away? He passed away Apirl 18th 1955. or 04/18/55

As far as the code.. it returns the answer: 2

as far as the common thread.. idk

1 decade ago
Permalink

Comment has been collapsed.

you're wrong on the code part

1 decade ago
Permalink

Comment has been collapsed.

That, is why you fail.

1 decade ago
Permalink

Comment has been collapsed.

Plus this one seems really simple. Just check wikipedia for 1st answer, run the code for second and google for a greatest common divisor calculator for the third assuming you know none of the answers.

1 decade ago
Permalink

Comment has been collapsed.

Deleted

This comment was deleted 1 year ago.

1 decade ago
Permalink

Comment has been collapsed.

The answer is always 42, no matter the question.

1 decade ago
Permalink

Comment has been collapsed.

haha, solved. man are you gonna be surprised of the answers :3

1 decade ago
Permalink

Comment has been collapsed.

In which year did Albert Einstein pass away? France

What is the returned value? Tom Jones

What is the greatest common divisor of the previous two results? Not so sure, but I think its probably the rabbit from Fatal Attraction

1 decade ago
Permalink

Comment has been collapsed.

Your code will return 1955 (as well as the answer to the question about Einstein), so I suppose the answer to the third riddle is 1955 as well as it is greatest common divisor

1 decade ago
Permalink

Comment has been collapsed.

Closed 1 decade ago by previoususer.