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;
}
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
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 6 - Là năm đầu tiên của cấp trung học cơ sở. Được sống lại những khỉ niệm như ngày nào còn lần đầu đến lớp 1, được quen bạn mới, ngôi trường mới, một tương lai mới!
Nguồn : ADMIN :))Copyright © 2021 HOCTAP247