ABC354

学贵坚持發表於2024-05-22

A

link

模擬整個過程即可。

點選檢視程式碼
#include<bits/stdc++.h>

#define int long long

using namespace std;

signed main(){
	
	int h;
	cin >> h;
	int day = 1ll,g = 0ll;
	while(g < h){
		g += (1ll<<day);
		day++;
	}
	
	cout << day;
	
	return 0;
	
}