いろんな言語で宿題スレ at TECH
[2ch|▼Menu]
294:デフォルトの名無しさん
09/06/26 17:14:14
>>293
% Prolog 最後6の表示が間違ってるが。

t293(N) :-
  length(L,N),
  append(L1,L2,L),
  not(L2=[]),
  all(L1,' '),
  all(L2,'*'),
  length(L1,N),
  N2 is N + 1,
  concat_atom(L,S),
  write_formatted('%t %t\n',[N2,S]),
  fail;
  true.

all([],_).
all([A|R],A) :- all(R,A).


次ページ
続きを表示
1を表示
最新レス表示
スレッドの検索
類似スレ一覧
話題のニュース
おまかせリスト
▼オプションを表示
暇つぶし2ch

4630日前に更新/314 KB
担当:undef