level 8
一个循环的题。
已经尝试过百度或者看资料没有找到答案 。
2014年03月24日 13点03分
1
level 8
把123456789这个数乘以一个什么数,能使它的结果不但不含零,而且仍然是 由1,2,3,4,5,6,7,8,9这九个数字组成的,只是顺序不同而已.
[
123456789*2=246913578 ;
123456789*4=493827156 ;
123456789*5=617283945
123456789*7=864197532 ;
123456789*8=987654312 ]
2014年03月24日 13点03分
2
level 8
我想的是使用拆分,判断各个数位不同但和相同,但是各个数位不同的判断方法?
2014年03月24日 13点03分
3
用mod 和集合来判断吧
2014年03月29日 12点03分
回复 未来我改变世界 :嗯。。好像明白了什么
2014年03月29日 12点03分
回复 沫沫沫沫忆丶 :加油
2014年03月29日 13点03分
level 2
FOR i:=1 to 9
FOR j:=1 to 9
FOR k:=1 to 9
FOR m:=1 to 9
FOR b:=1 to 9
FOR x:=1 to 9
FOR d:=1 to 9
FOR f:=1 to 9
FOR g:=1 to 9
FOR r:=1 to 9
begin
if 123456789*r=1000*i点点点点
气死老师
2014年04月06日 09点04分
10
再加上if i<>j点点点
2014年04月06日 09点04分
level 12
for i:1 to 9 do
begin
s:=i*123456789;
【取各位数】
if (全部相加=45)and(互不相等)then write(s);
end;
我是新人我什么都不知道
≮第一次评论,好紧张啊,有没有潜规则,用不用脱啊,该怎么说啊,打多少字才显的有文采啊,我写的这么好会不会太招遥,写的这么深奥别人会不会看不懂啊,好激动啊,怎么才能装成是经常评论的样子,好紧张啊。≯
2014年04月07日 08点04分
11
level 2
var i,x:integer;
a:array[0..9] of integer;
begin
for i:=2 to 9 do
begin
x:=i*123456789;
while (x<>0) and (a[0]=0) do
begin
inc(a[x mod 10]);
if a[x mod 10]>1 then
break;
x:=x div 10;
end;
if x=0 then
write(i);
end;
end.
2014年06月29日 03点06分
13
level 9
Type
Arr=Array[1..101] Of Integer;
Var
i,j,p,k,code,L,num,tp:Integer;
s: String;
a,aa,time,b,temp:Arr;
Procedure Mutiply(a, b:Arr;Var c:Arr;t:Integer);
Var
i, j: Integer;
Begin
FillChar(c, SizeOf(c), 0);
For i:=1 To t Do
For j:=1 To t-i+1 Do
Begin
c[i+j-1]:=a[i]*b[j]+c[i+j-1];
c[i+j]:=c[i+j]+c[i+j-1] Div 10;
c[i+j-1]:=c[i+j-1] Mod 10;
End;
End;
Procedure Mutiply(a:Arr;b:Integer;Var c:Arr;Var L:Integer);
Var
i: Integer;
Begin
FillChar(c,SizeOf(c),0);
For i:=1 To L Do
Begin
c[i]:=c[i]+a[i]*b;
c[i+1]:=c[i] Div 10;
c[i]:=c[i] Mod 10;
End;
If c[L+1]<>0 Then
Inc(L);
End;
Begin
ReadLn(s);
Val(Copy(s, Pos(' ', s)+1, Length(s)-Pos(' ', s)), k, code);
Delete(s, Pos(' ', s), Length(s)-Pos(' ', s)+1);
For i:=1 To Length(s) Do
Val(s[i], a[Length(s)-i+1], code);
aa:=a;
FillChar(time, SizeOf(time), 0);
time[1] := 1;
L := 1;
For i:=1 To k Do
Begin
For j:=1 To i Do
b[j] := aa[j];
tp := b[i];
num := 0;
Repeat
Mutiply(b, a, b, i);
Inc(num);
Until (num > 10) Or (b[i] = tp);
If (b[i] <> tp) Then Begin
Write(-1);
Close(Input);
Close(Output);
Halt(0);
End;
temp := a;
For j:=1 To num-1 Do
Mutiply(a, temp, a, k);
Mutiply(time, num, time, L);
End;
For i:=L DownTo 1 Do Write(time[i]);
End.
2014年07月02日 12点07分
16