Thứ Tư, 10 tháng 8, 2022

tichlt c++

#include <bits/stdc++.h>
using namespace std;
int n,k;
int main()
{
    //freopen("tichlt.inp","r",stdin);
    //freopen("tichlt.out","w",stdout);
    cin>>n;
    k=int(sqrt(n));
    if(k*(k+1)==n) 
        cout<<k<<" "<<(k+1);
    else 
        cout<<"khong";
}

Không có nhận xét nào:

Đăng nhận xét

Lưu ý: Chỉ thành viên của blog này mới được đăng nhận xét.