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 a:array[1..100]of integer;
n,i,x,t,dem:integer;
begin
clrscr;
readln(n);
for i:=1 to n do readln(a[i]);
readln(x);
dem:=0;
t:=0;
for i:=1 to n do
if a[i]>x then
begin
write(a[i]:4);
t:=t+a[i];
dem:=dem+1;
end;
writeln;
writeln(t);
writeln(dem);
readln;
end.
program CheckPrime;
var
s: string;
n: integer;
function IsPrime(n: integer): boolean;
var
i: integer;
begin
if n < 2 then
IsPrime := false
else
begin
IsPrime := true;
for i := 2 to Trunc(Sqrt(n)) do
begin
if n mod i = 0 then
begin
IsPrime := false;
Break;
end;
end;
end;
end;
begin
Write('Nhap vao mot chuoi: ');
ReadLn(s);
n := StrToInt(s);
if IsPrime(n) then
WriteLn('Day la mot so nguyen to')
else
WriteLn('Day khong phai la mot so nguyen to');
end.
Var s,i:integer;
Begin
s:=0;
i:=0;
While S<1000 do
Begin
i:=i+1;
s:=s+i;
End;
Write('n la ',i);
Readln;
End.
uses crt;
var n:integer;
begin
clrscr;
repeat
write('Nhap n='); readln(n);
until n>0;
if sqrt(n)=trunc(sqrt(n)) then writeln(n,' la so chinh phuong')
else writeln(n,' khong la so chinh phuong');
readln;
end.
program hotrotinhoc ;
var n,P : integer ;
begin
P:=1;
while P<=2000 do
begin
n:=n+1;
P:=P*i ;
end;
write('P=',P);
readln
end.
program hotrotinhoc ;
var n,P : integer ;
begin
P:=1;
while P<=2000 do
begin
n:=n+1;
P:=P*i ;
end;
write('P=',P);
readln
end.
program in_mang;
uses crt;
var i,n,max:longint;
a:array[1..100]of longint;
begin
clrscr;
write('nhap so n:');readln(n);
for i:=1 to n do
begin
write('a[',i,']=');readln(a[i]);
end;
writeln('cac phan tu chan:');
for i:=1 to n do
if a[i] mod 2=0 then write(a[i]:3);
writeln;
max:=a[1];
for i:=1 to n do
if max<a[i] then max:=a[i];
writeln('max cua day la:',max);
readln;
end.
uses crt;
var a:array[1..100]of integer;
i,n,max:integer;
begin
clrscr;
write('Nhap n='); readln(n);
for i:=1 to n do
begin
write('A[',i,']='); readln(a[i]);
end;
for i:=1 to n do
if a[i] mod 2=0 then write(a[i]:4);
writeln;
max:=a[1];
for i:=1 to n do
if max<a[i] then max:=a[i];
writeln(max);
readln;
end.
#include <bits/stdc++.h>
using namespace std;
#define nmax 1000007
#define ll long long
int main()
{
cin.tie(0)->sync_with_stdio(0);
long long a, b;
cin >> a >> b;
cout << b / a << ' ' << b % a;
}
c++