Hmm, esse dai dava pau: <span class="Apple-style-span" style="font-family: Helvetica; font-size: 13px; color: rgb(51, 51, 51); "><div id="content" style="width: 900px; "><div id="inouterr" class="view_box" style="margin-bottom: 1em; padding-left: 0.5em; padding-right: 0.5em; ">

<ul id="ul_inouterr" style="list-style-type: none; list-style-position: initial; list-style-image: initial; padding-left: 0px; padding-right: 0px; padding-top: 0px; padding-bottom: 0px; margin-top: 0px; "><li id="li_PZByX" class="li_inouterr" style="padding-top: 6px; padding-right: 6px; padding-bottom: 6px; padding-left: 6px; background-image: initial; background-attachment: initial; background-origin: initial; background-clip: initial; background-color: rgb(234, 234, 234); margin-bottom: 6px; border-top-width: 1px; border-right-width: 1px; border-bottom-width: 1px; border-left-width: 1px; border-top-style: solid; border-right-style: solid; border-bottom-style: solid; border-left-style: solid; border-top-color: rgb(208, 208, 208); border-right-color: rgb(208, 208, 208); border-bottom-color: rgb(208, 208, 208); border-left-color: rgb(208, 208, 208); background-position: initial initial; background-repeat: initial initial; ">

<div id="err_515690" class="hidden out" style="display: block; "><pre class="box" style="margin-top: 0px; padding-top: 0.5em; padding-right: 0.5em; padding-bottom: 0.5em; padding-left: 0.5em; background-color: rgb(240, 240, 240); border-top-width: 1px; border-right-width: 1px; border-bottom-width: 1px; border-left-width: 1px; border-top-style: solid; border-right-style: solid; border-bottom-style: solid; border-left-style: solid; border-top-color: rgb(153, 153, 153); border-right-color: rgb(153, 153, 153); border-bottom-color: rgb(153, 153, 153); border-left-color: rgb(153, 153, 153); color: rgb(0, 0, 102); ">

Can&#39;t take log of 0 at <a href="http://prog.pl">prog.pl</a> line 1, &lt;&gt; line 4.
</pre></div></li></ul></div><div id="view_commants" style="padding-left: 0.5em; "></div></div></span><div><br></div>Mas esse daki funciona, mas ta dando resposta errada, ai desisti!<div>Ja tentei botar &quot;\r\n&quot;, &quot;\n&quot;, tirar o \n, etc..</div>

<div><span class="Apple-style-span" style="font-family: Helvetica; font-size: 13px; color: rgb(51, 51, 51); "><div id="code" class="view_box" style="margin-bottom: 1em; padding-left: 0.5em; padding-right: 0.5em; "><pre class="source" style="margin-top: 0px; ">

<table class="perl" style="font-family: monospace; color: rgb(0, 0, 102); border-top-width: 1px; border-right-width: 1px; border-bottom-width: 1px; border-left-width: 1px; border-top-style: solid; border-right-style: solid; border-bottom-style: solid; border-left-style: solid; border-top-color: rgb(208, 208, 208); border-right-color: rgb(208, 208, 208); border-bottom-color: rgb(208, 208, 208); border-left-color: rgb(208, 208, 208); background-color: rgb(240, 240, 240); padding-top: 3px; padding-right: 3px; padding-bottom: 3px; padding-left: 3px; width: 880px; ">

<tbody><tr class="li1"><td class="de1" style="vertical-align: top; "><pre class="de1" style="margin-top: 0px; margin-bottom: 0px; padding-bottom: 5px; padding-top: 3px; padding-left: 10px; "><span class="kw1" style="line-height: 13px !important; color: rgb(177, 177, 0); ">for</span><span class="br0" style="line-height: 13px !important; color: rgb(0, 153, 0); ">(</span><span class="sy0" style="line-height: 13px !important; color: rgb(51, 153, 51); ">&lt;&gt;</span><span class="br0" style="line-height: 13px !important; color: rgb(0, 153, 0); ">)</span><span class="br0" style="line-height: 13px !important; color: rgb(0, 153, 0); ">{</span><span class="co5" style="line-height: 13px !important; color: rgb(0, 0, 255); ">$_</span> <span class="sy0" style="line-height: 13px !important; color: rgb(51, 153, 51); ">|=</span> <span class="co5" style="line-height: 13px !important; color: rgb(0, 0, 255); ">$_</span><span class="sy0" style="line-height: 13px !important; color: rgb(51, 153, 51); ">&gt;&gt;</span><span class="nu0" style="line-height: 13px !important; color: rgb(204, 102, 204); ">1</span><span class="sy0" style="line-height: 13px !important; color: rgb(51, 153, 51); ">;</span> <span class="co5" style="line-height: 13px !important; color: rgb(0, 0, 255); ">$_</span> <span class="sy0" style="line-height: 13px !important; color: rgb(51, 153, 51); ">|=</span> <span class="co5" style="line-height: 13px !important; color: rgb(0, 0, 255); ">$_</span><span class="sy0" style="line-height: 13px !important; color: rgb(51, 153, 51); ">&gt;&gt;</span><span class="nu0" style="line-height: 13px !important; color: rgb(204, 102, 204); ">2</span><span class="sy0" style="line-height: 13px !important; color: rgb(51, 153, 51); ">;</span> <span class="co5" style="line-height: 13px !important; color: rgb(0, 0, 255); ">$_</span> <span class="sy0" style="line-height: 13px !important; color: rgb(51, 153, 51); ">|=</span> <span class="co5" style="line-height: 13px !important; color: rgb(0, 0, 255); ">$_</span><span class="sy0" style="line-height: 13px !important; color: rgb(51, 153, 51); ">&gt;&gt;</span><span class="nu0" style="line-height: 13px !important; color: rgb(204, 102, 204); ">4</span><span class="sy0" style="line-height: 13px !important; color: rgb(51, 153, 51); ">;</span> <span class="co5" style="line-height: 13px !important; color: rgb(0, 0, 255); ">$_</span> <span class="sy0" style="line-height: 13px !important; color: rgb(51, 153, 51); ">|=</span> <span class="co5" style="line-height: 13px !important; color: rgb(0, 0, 255); ">$_</span><span class="sy0" style="line-height: 13px !important; color: rgb(51, 153, 51); ">&gt;&gt;</span><span class="nu0" style="line-height: 13px !important; color: rgb(204, 102, 204); ">8</span><span class="sy0" style="line-height: 13px !important; color: rgb(51, 153, 51); ">;</span> <span class="co5" style="line-height: 13px !important; color: rgb(0, 0, 255); ">$_</span> <span class="sy0" style="line-height: 13px !important; color: rgb(51, 153, 51); ">|=</span> <span class="co5" style="line-height: 13px !important; color: rgb(0, 0, 255); ">$_</span><span class="sy0" style="line-height: 13px !important; color: rgb(51, 153, 51); ">&gt;&gt;</span><span class="nu0" style="line-height: 13px !important; color: rgb(204, 102, 204); ">16</span><span class="sy0" style="line-height: 13px !important; color: rgb(51, 153, 51); ">;</span>print <span class="sy0" style="line-height: 13px !important; color: rgb(51, 153, 51); ">++</span><span class="co5" style="line-height: 13px !important; color: rgb(0, 0, 255); ">$_</span><span class="sy0" style="line-height: 13px !important; color: rgb(51, 153, 51); ">.</span><span class="st0" style="line-height: 13px !important; color: rgb(255, 0, 0); ">&quot;<span class="es0" style="line-height: 13px !important; color: rgb(0, 0, 153); font-weight: bold; ">\n</span>&quot;</span><span class="br0" style="line-height: 13px !important; color: rgb(0, 153, 0); ">}</span></pre>

</td></tr></tbody></table></pre></div><div id="inouterr" class="view_box" style="margin-bottom: 1em; padding-left: 0.5em; padding-right: 0.5em; "></div></span><div class="gmail_quote">2010/7/25 Pinguim Azul <span dir="ltr">&lt;<a href="mailto:bluepenguin@gmail.com">bluepenguin@gmail.com</a>&gt;</span><br>

<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex;">Ele funciona mesmo se tiver um 0 na entrada?<br>
<div class="im"><br>
2010/7/25 Renato Santos &lt;<a href="mailto:renato.cron@gmail.com">renato.cron@gmail.com</a>&gt;:<br>
</div><div><div></div><div class="h5">&gt; agora eu eu vou fazer um super off topic!<br>
&gt; Estou tentando resolver um problema simples (next power of 2)<br>
&gt; mas ta dando erro em tempo de compilacao<br>
&gt; for(&lt;&gt;){$l=log($_)/log(2);$l=int($l+1)if $l!=int($l);print 2**$l.&quot;\n&quot;}<br>
&gt; Mas no ideone funciona<br>
&gt;<br>
&gt; 2010/7/25 Pinguim Azul &lt;<a href="mailto:bluepenguin@gmail.com">bluepenguin@gmail.com</a>&gt;<br>
&gt;&gt;<br>
&gt;&gt; 2010/7/25 Eden Cardim &lt;<a href="mailto:edencardim@gmail.com">edencardim@gmail.com</a>&gt;:<br>
&gt;&gt; &gt;&gt;&gt;&gt;&gt;&gt; &quot;Pinguim&quot; == Pinguim Azul &lt;<a href="mailto:bluepenguin@gmail.com">bluepenguin@gmail.com</a>&gt; writes:<br>
&gt;&gt; &gt;    Pinguim&gt; Nenhum dos dois vai funcionar, porque vocês ignoraram o<br>
&gt;&gt; &gt;    Pinguim&gt; primeiro número.<br>
&gt;&gt; &gt;<br>
&gt;&gt; &gt; O exemplo proposto em <a href="https://www.spoj.pl/SHORTEN/problems/SIZECON/" target="_blank">https://www.spoj.pl/SHORTEN/problems/SIZECON/</a> não<br>
&gt;&gt; &gt; é bem claro quanto ao que se deve fazer com entradas mal-formadas. Um<br>
&gt;&gt; &gt; exemplo melhor seria se demonstrar a saída pra esse caso. Isso<br>
&gt;&gt; &gt; provavelmente explica porque tem tantos erros para um problema tão<br>
&gt;&gt; &gt; fácil.<br>
&gt;&gt;<br>
&gt;&gt; Eu concordo que esse problema está mal escrito mesmo, mas eu acho que<br>
&gt;&gt; ele é exceção.<br>
&gt;&gt;<br>
&gt;&gt; --<br>
&gt;&gt; Ricardo Bittencourt<br>
&gt;&gt; <a href="http://www.ricbit.com" target="_blank">http://www.ricbit.com</a><br>
&gt;&gt; _______________________________________________<br>
&gt;&gt; SaoPaulo-pm mailing list<br>
&gt;&gt; <a href="mailto:SaoPaulo-pm@pm.org">SaoPaulo-pm@pm.org</a><br>
&gt;&gt; <a href="http://mail.pm.org/mailman/listinfo/saopaulo-pm" target="_blank">http://mail.pm.org/mailman/listinfo/saopaulo-pm</a><br>
&gt;<br>
&gt;<br>
&gt;<br>
&gt; --<br>
&gt; Renato Santos<br>
&gt; <a href="http://www.renatocron.com/blog/" target="_blank">http://www.renatocron.com/blog/</a><br>
&gt;<br>
&gt; _______________________________________________<br>
&gt; SaoPaulo-pm mailing list<br>
&gt; <a href="mailto:SaoPaulo-pm@pm.org">SaoPaulo-pm@pm.org</a><br>
&gt; <a href="http://mail.pm.org/mailman/listinfo/saopaulo-pm" target="_blank">http://mail.pm.org/mailman/listinfo/saopaulo-pm</a><br>
&gt;<br>
<br>
<br>
<br>
--<br>
Ricardo Bittencourt<br>
<a href="http://www.ricbit.com" target="_blank">http://www.ricbit.com</a><br>
_______________________________________________<br>
SaoPaulo-pm mailing list<br>
<a href="mailto:SaoPaulo-pm@pm.org">SaoPaulo-pm@pm.org</a><br>
<a href="http://mail.pm.org/mailman/listinfo/saopaulo-pm" target="_blank">http://mail.pm.org/mailman/listinfo/saopaulo-pm</a><br>
</div></div></blockquote></div><br><br clear="all"><br>-- <br>Renato Santos<br><a href="http://www.renatocron.com/blog/" target="_blank">http://www.renatocron.com/blog/</a><br>
</div>