小问题
pascal吧
全部回复
仅看楼主
level 9
superkee七 楼主
学校体操到操场集合,排成每行2人,最后多出1人;排成每行3人,也多出1人;分别每行排4、5、6都多出一人,当排成7人时,正好不多,求操场至少是多少人?
肿么编
2014年01月10日 10点01分 1
level 7
program ex;
var
i:integer;
p:boolean;
begin
i:=0;
p:=true;
while p do
begin
i:=i+1;
if (i mod 2=1)and(i mod 3=1)and
(i mod 4=1)and(i mod 5=1)and
(i mod 6=1)and(i mod 7=0)
then p:=false;
end;
writeln(i);
end.
2014年01月11日 04点01分 2
level 11
同余定理。直接墙公式。
2014年01月12日 10点01分 4
1