PersonalCorpus 版 (精华区)
152825 08:54:29 3 Mar 2002
Bozhang,HIT,P.R.China 1191 Pascal Accepted 0.02 sec 49K
var
l,n,k:integer;
begin
readln(l,n);
while n>0 do begin
dec(n);
read(k);
if l<k then begin writeln('YES');halt end;
l:=l-(l mod k);
end;
if l=0 then writeln('YES') else writeln('NO');
end.
Powered by KBS BBS 2.0 (http://dev.kcn.cn)
页面执行时间:2.774毫秒