Back to General discussions forum
Hello people who have solved problem 223,
Testing my multiplex function on the scheme interpreter yielded the correct answer in what seems to be the correct format, but the checker says that the output doesn't end with a single-digit value.
Do I need to account for negative numbers?
Is there something wrong with how output is displayed?
Any feedback is appreciated.
thanks,
Jesse
Hi.
Your code produces 1937 189 72 14 4
for the example in the problem, but somehow 1937 189 72 14 4#t
is required.
I never fully understood the finer nuances of this ... maybe somebody with LISP background can explain.
Wow, I never expected that. I just now added (= 1 1) at the end and the answer was accepted. Thank you for the help!
How did you figure out #t
was needed?
Hm-m-m, it is not much about lisp, probably... this more looks like something may need to be fixed on interpreter or checker side, I feel a bit confused, sorry.
Jesse, could you please provide the exact version of your function which causes the trouble?
Could it be that this relates to only displaying things in a function but not actually returning anything?
The (= 1 1)
adds a return value.
Sure Rodion, a copy can be found in my unsuccessful solutions list under Lisp.
Thanks for clarification - and thanks for reporting this! Definitely some queer bug - as I see the interpreter used by the site doesn't print the last number, unlike the javascript version.
I'm much sorry, but also much glad you reported this!
Shall look further into it some time later - going to skate with my dog now to fetch my wife's yoga magic carpet from the closing yoga studio - oh that Sunday morning :)))
Well, sorry for it took time. Culprit was this small line in your code
(else display t)
where you probably meant
(else (display t))
I'm not yet 100% clearly understanding how exactly it confused us, but seemingly your code printed all values except the last, while the last value in online emulator was added as a result returned from function.
Clearly this is unlucky representation issue. And also it become clear to me that it would be better to provide a way to run the code against server scheme executor to cross-verify it. I'll work on it.
Oh my God I just saw your reply Rodion. Sorry for not replying all this time! It seems like I was ignoring you...
Thank you for discovering the issue. I will change it now. :)
It seems like I was ignoring you
ha-ha, no, no worry - it more seems like we are lacking notifications on new forum answers... I really, really hope to add them, hopefully, in not very far future...