Grettings! I've seen this on many competetions. You would need to use some logarithms, I've figured out. But then... Modula (or what is it, you know %). But I can't use it, and when I browsed mathweb, they babbeled something about rings. Maybe I need to check that out first. I donno.