TE
科技回声
首页24小时热榜最新最佳问答展示工作
GitHubTwitter
首页

科技回声

基于 Next.js 构建的科技新闻平台,提供全球科技新闻和讨论内容。

GitHubTwitter

首页

首页最新最佳问答展示工作

资源链接

HackerNews API原版 HackerNewsNext.js

© 2025 科技回声. 版权所有。

Show HN: Astro-Bot – A programming question with every new tab

46 点作者 hadeon超过 6 年前

9 条评论

svet_0超过 6 年前
Pretty cool! However, some riddles are incorrect, for example this one has two errors:<p><pre><code> def foo( vals ): output = vals[0] for x in vals[1:]: if output &lt; x: output = x return x </code></pre> 1. It should return output<p>2. The answer should be &quot;The maximum value&quot;, not &quot;The minimum value&quot;<p>Also, it could be nice if after you solve a riddle you would get a new one.
评论 #18335040 未加载
teddyh超过 6 年前
Wouldn’t a better idea be to show a question on Stack Overflow which is somewhat upvoted but still without an accepted answer?
评论 #18336066 未加载
评论 #18335146 未加载
ngcazz超过 6 年前
<p><pre><code> $ git checkout -b feature </code></pre> The answer to this is wrong -- got green on &quot;merge two branches&quot; rather than &quot;create and then checkout a new branch called &#x27;feature&#x27;&quot;.
评论 #18349719 未加载
wink超过 6 年前
Why would I want to be distracted while doing a task that serves a certain purpose? I must be the only one not just opening new tabs out of boredom :P
评论 #18349709 未加载
seg12超过 6 年前
The following is incorrect for finding a missing number in a sequence.<p><pre><code> func foo( _ nums: [Int] ) -&gt; Int { var sum = 0 var _ = nums.map {sum += $0} return (nums.count * ((nums.count+1) &#x2F; 2)) - sum } </code></pre> The last line should be<p><pre><code> return ((nums.count+1) * ((nums.count+2) &#x2F; 2)) - sum </code></pre> The count of nums will give the incorrect answer since it&#x27;s already missing a value.
评论 #18342688 未加载
anandkulkarni超过 6 年前
I enjoyed it, but you should allow me to disable random HackerNews links. That&#x27;s not the purpose of the extension.
评论 #18340417 未加载
nightraven97超过 6 年前
Nice! It would be cool if there was some kind of points to denote how many questions we have answered correctly.
评论 #18340414 未加载
cift超过 6 年前
Is there a Firefox version?
评论 #18340333 未加载
grimoire_ghost超过 6 年前
#include&lt;stdio.h&gt;<p>int main() { int array[] = { 1, 2, 3, 4, 5}; int *ptr; ptr = a; ptr++;<p><pre><code> return 0; </code></pre> }<p>This won&#x27;t compile, but the answer says it should be 2
评论 #18340401 未加载