1.
var n:longint;
//
function gt(n:longint):int64;
var h:longint;
begin
gt:=1;
for h:=2 to n do gt:=gt*h;
end;
//
begin
read(n);
write(gt(n));
end.
2.
var n,x:longint;
//
function power(a:longint):int64;
var tmp:longint;
begin
if a=1 then exit(x);
tmp:=power(a div 2);
if a mod 2=0 then exit(tmp*tmp) else exit(tmp*tmp*x);
end;
//
begin
read(x,n);
write(power(n));
end.
3.
var n:longint;
begin
read(n);
if (n=6) or (n=28) or (n=496) and (n=8128) then write('Co la so hoan hao')
else write('Khong la so hoan hao');
end.
4.
var n:longint;
//
function snt(x:longint):boolean;
var h:longint;
begin
if x<2 then exit(false);
for h:=2 to trunc(sqrt(x)) do
if x mod h=0 then exit(false);
exit(true);
end;
//
begin
read(n);
if snt(n)=true then write('Co la so nguyen to')
else write('Khong la so nguyen to');
end.
5.
var n:longint;
begin
read(n);
if 6<=n then write(6,' ') else begin
write('Khong co so nao');
exit;
end;
if 28<=n then write(28,' ') else exit;
if 496<=n then write(496,' ') else exit;
if 8128<=n then write(8128,' ') else exit;
end.
6.
var n:longint;
//
procedure sang_ngto;
var i,j,h:longint;
kt:array[1..10000000] of boolean;
begin
fillchar(kt,sizeof(kt),true);
for j:=2 to trunc(sqrt(n)) do
begin
if kt[j]=false then continue;
i:=j*j;
while i<=n do
begin
kt[i]:=false;
i:=i+j;
end;
end;
for h:=2 to n do
if kt[h]=true then write(h,' ');
end;
begin
read(n);
sang_ngto;
end.
1.
var n:longint;
//
function gt(n:longint):int64;
var h:longint;
begin
gt:=1;
for h:=2 to n do gt:=gt*h;
end;
//
begin
read(n);
write(gt(n));
end.
2.
var n,x:longint;
//
function power(a:longint):int64;
var tmp:longint;
begin
if a=1 then exit(x);
tmp:=power(a div 2);
if a mod 2=0 then exit(tmp*tmp) else exit(tmp*tmp*x);
end;
//
begin
read(x,n);
write(power(n));
end.
3.
var n:longint;
begin
read(n);
if (n=6) or (n=28) or (n=496) and (n=8128) then write('Co la so hoan hao')
else write('Khong la so hoan hao');
end.
4.
var n:longint;
//
function snt(x:longint):boolean;
var h:longint;
begin
if x<2 then exit(false);
for h:=2 to trunc(sqrt(x)) do
if x mod h=0 then exit(false);
exit(true);
end;
//
begin
read(n);
if snt(n)=true then write('Co la so nguyen to')
else write('Khong la so nguyen to');
end.
5.
var n:longint;
begin
read(n);
if 6<=n then write(6,' ') else begin
write('Khong co so nao');
exit;
end;
if 28<=n then write(28,' ') else exit;
if 496<=n then write(496,' ') else exit;
if 8128<=n then write(8128,' ') else exit;
end.
6.
var n:longint;
//
procedure sang_ngto;
var i,j,h:longint;
kt:array[1..10000000] of boolean;
begin
fillchar(kt,sizeof(kt),true);
for j:=2 to trunc(sqrt(n)) do
begin
if kt[j]=false then continue;
i:=j*j;
while i<=n do
begin
kt[i]:=false;
i:=i+j;
end;
end;
for h:=2 to n do
if kt[h]=true then write(h,' ');
end;
//
begin
read(n);
sang_ngto;
end.
Tin học, tiếng Anh: informatics, tiếng Pháp: informatique, là một ngành khoa học chuyên nghiên cứu quá trình tự động hóa việc tổ chức, lưu trữ, xử lý và truyền dẫn thông tin của một hệ thống máy tính cụ thể hoặc trừu tượng (ảo). Với cách hiểu hiện nay, tin học bao hàm tất cả các nghiên cứu và kỹ thuật có liên quan đến việc mô phỏng, biến đổi và tái tạo thông tin.
Nguồn : Wikipedia - Bách khoa toàn thưLớp 8 - Năm thứ ba ở cấp trung học cơ sở, học tập bắt đầu nặng dần, sang năm lại là năm cuối cấp áp lực lớn dần nhưng các em vẫn phải chú ý sức khỏe nhé!
Nguồn : ADMIN :))Copyright © 2021 HOCTAP247