求助:为啥只有40分,萌新找不出错在哪儿了

P1151 子数整数

```pascal var s,s1,s2,s3:string; k,j,t,c,n1,n2,n3:int64; a:array[1..99999] of int64; begin read(k); j:=0; for t:=10000 to 30000 do begin str(t,s); s1:=copy(s,1,3); s2:=copy(s,2,3); s3:=copy(s,3,3); val(s1,n1); val(s2,n2); val(s3,n3); if (n1 mod k=0) and (n2 mod k=0) and (n3 mod k=0) then begin j:=j+1; a[j]:=t; end; end; if j = 0 then write('No') else for c:=1 to j do write(a[j],' '); end. ``` 主贴代码怎么乱掉了?还是我卡了?
by Ouyyx2002 @ 2018-02-20 18:49:53


你的a[j]必须一行一个
by 曦行夜落 @ 2018-03-03 16:57:32


@[曦行夜落](/space/show?uid=50818) 一行一个仍然不行诶
by Ouyyx2002 @ 2018-07-25 17:53:12


|