We use cookies to ensure you have the best browsing experience on our website. Please read our cookie policy for more information about how we use cookies.
Expressions V2
Expressions V2
Sort by
recency
|
10 Discussions
|
Please Login in order to post a comment
I think this problem might not be tagged as Expert
Sorry for my perhaps naive question.
When I compute 10^(p-2) using fast modular exponentiation as suggested by the challenge author I do not get the expected result of 700000005. My code for fast modular exponentiation is below (no spoiler here since it is a word for word rendering of the challenge author's own suggestion as he himself posted):
Indeed, the reported result for modexp 10. (p-.2.) is 485926138.
Can someone point me in the right direction? Thank you!
AC using SLR(1) and LL(1) Parsing
I hate to boast, but this should not be classified as 'Expert' : solved in 2 hours flat :D
Hello!
I have a question and a remark after completing this challenge :p
The question is Why no one uses a Lex/Yacc equivalent? This seems by far the most straightforward way to do this. And I see no interest in creating a custom lexer/parser :O
As for the remark, I think this challenge is not worth 100 points. It took 15 minutes to produce the 70 lines of code that solve it. I'd rather say 10 points (Yeah I know, I expose myself to some backfiring that way, let's see where the debate goes :-) ) The only difficulty IMHO was calculating the inverse of a number, but the problem statement gives explicitly the solution.