Hãy nhập câu hỏi của bạn vào đây, nếu là tài khoản VIP, bạn sẽ được ưu tiên trả lời.
USES crt;
VAR n,m,p,q:integer;
Function UCLN(x,y:integer):integer;
Var i,t:integer;
Begin
for i:=1 to x do
if (x mod i=0) and (y mod i =0) then t:=i;
UCLN:=t;
End;
BEGIN
clrscr;
write('Nhap n:'); readln(n);
write('Nhap m:'); readln(m);
p:=n div UCLN(n,m); q:=m div UCLN(n,m);
write('Cap (p,q) la:',p,' ',q);
readln;
END.
Trên đề bạn cho test sai rồi. 57 đâu phải là số nguyên tố đâu bạn. Dễ nhìn thấy 5+7=12 chia hết cho 3.Nên trong dãy mới thì không có số 57. Lần sau bạn chú ý cho test đúng bạn nhé.
Program HOC24;
var s,sc,st: string;
a,b: array[1..10000] of string;
c: array[1..10000] of integer;
i,n,k,d2,t,d,d1:longint;
p: integer;
function nt(x: longint): boolean;
var j: longint;
begin
nt:=true;
if (x=2) or (x=3) then exit;
nt:=false;
if (x=1) or (x mod 2=0) or (x mod 3=0) then exit;
j:=5;
while (j<=trunc(sqrt(x))) do
begin
if (x mod j=0) or (x mod (j+2)=0) then exit;
j:=j+6;
end;
nt:=true;
end;
begin
write('Nhap k='); readln(k);
for i:=1 to 30000 do
if nt(i) then
begin
str(i,sc);
inc(d);
a[d]:=sc;
end;
for i:=1 to d do
begin
inc(d1);
b[d1]:=a[i]+a[i+1];
end;
for i:=1 to d1 do
begin
val(b[i],p);
if nt(p) then begin inc(d2); st:=b[i]; end;
if k=d2 then break;
end;
write(st);
readln
end.
uses crt;
const f='ngtoghep.inp';
var d,n,k,kt1,i,j,x,kt2,u,kt:longint;
st1,st2,st:string;
y:integer;
f1:text;
begin
clrscr;
assign(f1,f); reset(f1);
readln(f1,k);
if k>1 then begin
d:=1;
n:=3;
repeat
repeat
kt:=0;
n:=n+2;
for i:=2 to trunc(sqrt(n)) do
if n mod i=0 then kt:=1;
if kt=0 then str(n,st1);
until kt=0;
{----------------------------------------}
repeat
kt:=0;
n:=n+2;
for j:=2 to trunc(sqrt(n)) do
if n mod j=0 then kt:=1;
if kt=0 then str(n,st2);
until kt=0;
{----------------------------------------}
kt:=0;
st:=st1+st2;
val(st,x,y);
for i:=2 to trunc(sqrt(x)) do
if x mod i=0 then kt:=1;
if kt=0 then d:=d+1;
until d=k;
end;
if k=1 then write('so nguyen to ghep thu ',k,' la 23')
else writeln('so nguyen to ghep thu ',k,' la: ',x);
close(f1);
readln;
end.
uses crt;
var n,i:integer;
begin
clrscr;
readln(n);
for i:=1 to n do
if i mod 2=0 then write(i:4);
writeln;
for i:=1 to n do
if i mod 2=1 then write(i:4);
readln;
end.
uses crt;
var d,x,kt,j:integer;
st:string;
a:array[1..100]of longint;
i:longint;
begin
clrscr;
for i:=10000 to 99999 do
begin
str(i,st);
d:=length(st);
for j:=1 to d do
val(st[j],a[j],x);
kt:=0;
for j:=1 to d-1 do
if a[j]>=a[j+1] then kt:=1;
if kt=0 then write(i:6);
end;
readln;
end.
| STT | Tên | Link tài khoản HOC24 | Link bài dự thi | Ghi chú |
| 1 | Ngố ngây ngô | https://hoc24.vn/vip/nguyenminhnhat5 | https://www.youtube.com/watch?v=JOW3M0pDreE&t=11 | |
| 2 | Mắt Bão | https://hoc24.vn/vip/14947665289523 | https://www.youtube.com/watch?v=S0a2WY-GufA | |
| 3 | Pham Minh Tue | https://hoc24.vn/vip/86160855726 | https://www.youtube.com/watch?v=Wmzd8F6wnn0 | +2đ |
| 4 | Tô Việt Anh | https://hoc24.vn/vip/638859749385 | https://www.youtube.com/watch?v=WiXOjnEXHCs | +2đ |
| 5 | Đoàn Trần Quỳnh Hương | https://hoc24.vn/vip/6116815797729 | https://www.youtube.com/watch?v=gt9AWq7TND8 | +2đ |
| 6 | ||||
Cùng xem và ủng hộ những bài thuyết trình ấn tưởng bởi những thành viên rất ấn tượng nhé!
Tại sao em vào phần đăng kí dự thi trông trơn vậy ạ? (trong khi hôm qua em vào vẫn thấy người đăng kí dự thi)

#include <iostream>
#include <iomanip>
#include <cmath>
#include <cstdio>
using namespace std;
#include <bits/stdc++.h>
int main() {
int n;
cin >> n;
int total = 0;
for (int i = 1; i <= n; i++) {
if (i % 20 == 0 && i % 10 != 0) {
if (i <= (n / 10)) {
total += i * i;
}
} else {
total += i;
}
}
cout << "The total is: " << total << endl;
for (int i = 0; i < n; i++) {
int du = i % 10;
int tongcacso = i % 10 * i % 10 * i % 10;
cout << "du = " << du << endl;
total += du * du * du;
cout << "\nsum = " << total << endl;
cout << "sum = (sum+i*i*i) " << endl;
}
return 0;
}