

Hãy luôn nhớ cảm ơn và vote 5*
nếu câu trả lời hữu ích nhé!
Bài 10:
#include <bits/stdc++.h>
#define ll long long
using namespace std;
ll n, m;
int main()
{
ios::sync_with_stdio(0);
cin.tie(0);
cout.tie(0);
cin >> n >> m;
cout << __gcd(n, m);
return 0;
}
Bài 11:
#include <bits/stdc++.h>
#define ll long long
using namespace std;
ll n, m, dem = 0,i;
int main()
{
ios::sync_with_stdio(0);
cin.tie(0);
cout.tie(0);
cin >> n >> m;
while(n<m)
{
i=n*10/100;
n+=i;
dem++;
}
cout<<dem;
return 0;
}
Bài 12:
#include <bits/stdc++.h>
#define ll long long
using namespace std;
ll n, m, dem = 0, i, a[100005], j = 1;
bool cp(ll x)
{
ll y = sqrt(x);
if (y * y == x)
{
return true;
}
return false;
}
int main()
{
ios::sync_with_stdio(0);
cin.tie(0);
cout.tie(0);
cin >> n;
for (i = 1; i <= n; i++)
{
if (cp(i))
{
dem++;
a[j] = i;
j++;
}
}
j--;
cout << dem << endl;
for (i = 1; i <= j; i++)
{
cout << a[i] << " ";
}
return 0;
}
Hãy giúp mọi người biết câu trả lời này thế nào?

Bài 10
#include <bits/stdc++.h>
#define long
using namespace std;
int n, m;
int main()
{
cout<<"Moi Ban Nhap vao day";
ios::sync_with_stdio(0);
cin.tie(0);
cout.tie(0);
cin >> n >> m;
cout << __gcd(n, m);
return 0;
}
Bài 11
#include <bits/stdc++.h>
#define ll long long
using namespace std;
int n, m, dem = 0,i;
int main()
{
cout<<"Moi Ban nhap vao day";
ios::sync_with_stdio(0);
cin.tie(0);
cout.tie(0);
cin >> n >> m;
while(n<m)
{
i=n*10/100;
n+=i;
dem++;
}
cout<<dem;
return 0;
}
Bài 12
#include <bits/stdc++.h>
#define ll long long
using namespace std;
int n, m, dem = 0, i, a[100005], j = 1;
bool cp(ll x)
{
int y = sqrt(x);
if (y * y == x)
{
return true;
}
return false;
}
int main()
{
cout<<"Moi Ban ghi zo day" ;
ios::sync_with_stdio(0);
cin.tie(0);
cout.tie(0);
cin >> n;
for (i = 1; i <= n; i++)
{
if (cp(i))
{
dem++;
a[j] = i;
j++;
}
}
j--;
cout << dem << endl;
for (i = 1; i <= j; i++)
{
cout << a[i] << " ";
}
return 0;
}
#hang6a2020
Hãy giúp mọi người biết câu trả lời này thế nào?

Bảng tin