K
Khách

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 st:string;

d,i,t,x,y,a,b:integer;

begin

clrscr;

readln(st);

d:=length(st);

for i:=1 to d do write(st[i]:4);

writeln;

t:=0;

for i:=1 to d do

begin

val(st[i],x,y);

t:=t+x;

end;

writeln(t);

val(st[d],a,b);

if (a mod 2=0) then write(1)

else write(-1);

readln;

end.

#include <bits/stdc++.h>

using namespace std;

long long a[1000],i,n,t,dem,t1;

int main()

{

cin>>n;

for (i=1; i<=n; i++) cin>>a[i];

t=0;

for (i=1; i<=n; i++) if (a[i]%2==0) t+=a[i];

cout<<t<<endl;

t1=0;

dem1=0;

for (i=1; i<=n; i++)

if (a[i]<0)

{

cout<<a[i]<<" ";

t1+=a[i];

dem1++;

}

cout<<endl;

cout<<fixed<<setprecision(1)<<(t1*1.0)/(dem1*1.0);

return 0;

}

#include <bits/stdc++.h>
using namespace std;
long long a,b;
//chuongtrinhcon
long long gcd(long long a,long long b)
{
    if (b==0) return(a);
    return gcd(b,a%b);
}
//chuongtrinhchinh
int main()
{
    cin>>a>>b;

cout<<max(a,b)<<endl;

cout<<gcd(a,b)<<endl;
    if ((a>0 && b>0) or (a<0 && b<0)) cout<<a/gcd(a,b)<<" "<<b/gcd(a,b);
    else cout<<"-"<<-a/gcd(-a,b)<<" "<<b/gcd(-a,b);
    return 0;
}

 

10 tháng 6 2021

1.2 với \(x\ge0,x\in Z\)

A=\(\dfrac{2\sqrt{x}+7}{\sqrt{x}+2}=2+\dfrac{3}{\sqrt{x}+2}\in Z< =>\sqrt{x}+2\inƯ\left(3\right)=\left(\pm1;\pm3\right)\)

*\(\sqrt{x}+2=1=>\sqrt{x}=-1\)(vô lí)

*\(\sqrt{x}+2=-1=>\sqrt{x}=-3\)(vô lí
*\(\sqrt{x}+2=3=>x=1\)(TM)

*\(\sqrt{x}+2=-3=\sqrt{x}=-5\)(vô lí)

vậy x=1 thì A\(\in Z\)

 

17 tháng 12 2022

11)\(\dfrac{3x+1}{x-5}+\dfrac{2x}{x-5}=\dfrac{3x+2x+1}{x-5}=\dfrac{5x+1}{x-5}\)

12)\(\dfrac{4-x^2}{x-3}+\dfrac{2}{x^2-9}=\dfrac{4-x^2}{x-3}+\dfrac{2}{\left(x-3\right)\left(x+3\right)}=\dfrac{\left(4-x^2\right)\left(x+3\right)}{\left(x-3\right)\left(x+3\right)}+\dfrac{2}{\left(x-3\right)\left(x+3\right)}=\dfrac{2+\left(2-x\right)\left(2+x\right)\left(x+3\right)}{\left(x-3\right)\left(x+3\right)}\)

13)

\(\dfrac{3}{4x-2}+\dfrac{2x}{4x^2-1}=\dfrac{3}{2\left(2x-1\right)}+\dfrac{2x}{\left(2x-1\right)\left(2x+1\right)}=\dfrac{3\left(2x+1\right)}{2\left(2x-1\right)\left(2x+1\right)}+\dfrac{2.2x}{2\left(2x-1\right)\left(2x+1\right)}=\dfrac{6x+3+4x}{2\left(2x-1\right)\left(2x+1\right)}=\dfrac{10x+3}{2\left(2x-1\right)\left(2x+1\right)}\)

14)

\(\dfrac{2x+1}{2x-4}+\dfrac{5}{x^2-4}=\dfrac{2x+1}{2\left(x-2\right)}+\dfrac{5}{\left(x-2\right)\left(x+2\right)}=\dfrac{\left(2x+1\right)\left(x+2\right)}{2\left(x-2\right)\left(x+2\right)}+\dfrac{5.2}{2\left(x-2\right)\left(x+2\right)}=\dfrac{2x^2+5x+12}{2\left(x-2\right)\left(x+2\right)}\)