不是VIP会员,不能显示答案

题目解答

题目:
var
i, n, r, s, x: integer;
begin
readln(n);
for i:=1 to n do
begin
readln(x);
s:=0;
while x<>0 do
begin
r:=x mod 2;
if r=1 then s:=s+1;
x:=x div 2;
end;
writeln(s);
end;
end.
输入:
4
2
100
1000
66
输出:1 3 6 2
考点:
分析:
解答:
评论:
老师: