Page 59 - C:\Users\Admin\Desktop\Sach mem upweb\
P. 59
100 Problems & Solutions Trang 59
Write(hfo, ' + ', Fibo[i]);
Dec(n, Fibo[i]);
end;
end;
Writeln(hfo);
end;
Close(hfo);
Close(hfi);
end;
begin
Init;
Solution;
end.
Bài 12/1999 - N-mino
(Dành cho học sinh THPT)
Program Bai12;{Tinh va ve ra tat ca Mino}
Uses Crt;
Const fn = 'NMINO.INP';
fg = 'NMINO.OUT';
max = 16;
Type bang = array[0..max+1,0..max+1] of integer;
Var n : integer;
lonmin : integer;
hinh ,hinh1 ,xet ,dd : bang;
hang ,cot: array[1..max] of integer;
sl : integer;
qi,qj : array[1..max*max] of integer;
sh ,sc :integer;
hangthieu , cotthieu:integer;
slch : longint;
f : text;
Procedure Nhap;
Var f:text;
Begin
Assign(f,fn); Reset(f);
Readln(f ,n);
Close(f);
End;
Procedure Chuanbi;
Begin
lonmin:= trunc(sqrt(n));
If n <> sqr(lonmin) then Inc(lonmin);
slch := 0;
Tin học & Nhà trường 100 Đề Toán - Tin học