This comment is reply for 1200 katsu: ずいぶん冗長ですが、ポイントは ・複素...(ダブル完全数). Go to thread root.
katsu #1320(2007/07/22 03:14 GMT) [ Prolog ] Rating0/0=0.00
こちらの方がprologらしいですね。 でもやっぱり、10000だとずいぶん時間がかかります。
1 2 3 4 5
measure(N,I):-between(1,N,I), Xmod is N mod I, Xmod =:= 0. measures(N,R):-findall(X,measure(N,X),R). perfect_double(N,I):-between(1,N,I), measures(I,M), sumlist(M,S), I3 is I * 3, I3 =:= S. :-findall(X,perfect_double(10000,X),Xs),writeln(Xs).
Rating0/0=0.00-0+
[ reply ]
katsu
#1320()
[
Prolog
]
Rating0/0=0.00
Rating0/0=0.00-0+