Description: Joe and his entire College, total 1337 of them, went for a picnic. They were bored and they planned a game. Everybody stand in a circle, each of them identifiers starting 1 to 1337 consecutively in a circle, clockwise. The rule is that “a numbering CONTAINS or DIVISIBLE by 7, will reverse the direction”.
Let’s elaborate the game a bit more. The identifiers of the students who yell-out successive numbers, are: 1,2,3,4,5,6,7 (student 7 has just yell “7” and reversed the direction),6,5,4,3,2,1,1337 (student 1337 has just yell “14” and reversed the direction),1,2,3 (student 3 has just yell “17” and reversed the direction),2,1,1337,1336, and so on. Joe has his favorite number, and he wants to calculate where in the circle he should stand to yell that number out loud.
Now that the game is set, Joe wants to stand a place where he could yell his favourite number. Would you please help Joe?
To Search:
File list (Check if you may need any files):
file.java
q2.java