Thứ Bảy, 30 tháng 4, 2022

GAPGIAY C++

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

float y,x;
int d;
int main()
{
    freopen("gapgiay.inp","r",stdin);
    freopen("gapgiay.out","w",stdout);
    cin>>x>>y;
    y=y*1000;d=0;
    while(x<y)
    {
        x=x*2;
        d++;
    }
    cout<<d;
}

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.