C++
#include <bits/stdc++.h>
using namespace std;

int main()
{
    double t;
    cin >> t;
    for(int i = 1; i <= 10; i++){
        t = t + t * 0.05;
        cout << fixed << setprecision(3) << t << endl;
    }
}
C++
#include <bits/stdc++.h>
using namespace std;

int main(){
    long long n;
    cin >> n;
    long long temp = n;
    long long tong = 0;
    while(n != 0){
        int a = n % 10;
        n = n / 10;
        tong = tong + a;
    }
    if (temp % tong == 0){
        cout << "YES";
    } else {
        cout << "NO";
    }
}
C++
#include <bits/stdc++.h>
using namespace std;

int main() {
    long long n;
    cin >> n;
    long long dem =0;
    for (int i=1;i*i<=n;i++) {
        dem++;
    }
    cout << dem;
}

Bình luận

Mới nhất
Tải bình luận...

Không có bình luận nào.