You are viewing a single comment's thread. Return to all comments →
Hints:
What is 'S mod N' when N is a divisor of S?
'S mod N'
Learn that modulo arithmetic means: (a + b + c) mod N == (a mod N + b mod N + c mod N) mod N
(a + b + c) mod N == (a mod N + b mod N + c mod N) mod N
Do you need to calculate the full values of large tribonacci numbers?
A non-divisor cannot go on forever without repeating. Can you detect a cycle?
Let me know if these give away too much!
Seems like cookies are disabled on this browser, please enable them to open this website
Project Euler #225: Tribonacci non-divisors
You are viewing a single comment's thread. Return to all comments →
Hints:
What is
'S mod N'
when N is a divisor of S?Learn that modulo arithmetic means:
(a + b + c) mod N == (a mod N + b mod N + c mod N) mod N
Do you need to calculate the full values of large tribonacci numbers?
A non-divisor cannot go on forever without repeating. Can you detect a cycle?
Let me know if these give away too much!