UVa OJ 11636-Hello World!

    技术2025-01-28  24

    巨水:

    { Author:wzx961008 Problem:UVa 11636-Hello World! Verdict:Accepted Language:PASCAL Run Time:0.012s Submission Date:2011-02-10 08:19:21 } var casenum,num,ans,t,n:longint; begin while true do begin inc(casenum); readln(n); if n<=0 then break; t:=1; ans:=0; while t*2<=n do begin inc(ans); t:=t*2; end; if t<>n then inc(ans); writeln('Case ',casenum,': ',ans); end; end.

     

    最新回复(0)