大神们,全WA了QWQ,求助(C++)
查看原帖
大神们,全WA了QWQ,求助(C++)
668222
Blue_cat楼主2022/1/26 11:39
//#include <cstdio>
#include <iostream>
//#include <cstdlib>
//#include <windows.h>
//#include <Windowsx.h>
//#include <process.h>
//#include <winnt.h>
//#include <stddef.h>
//#include <fstream>
#include <cmath>
//#include <iomanip>
//#include <cstring>
using namespace std;
int main(){
	long long n , cnt=0;
	cin >> n;
	while(true){
		if(n == 1){
			break;
		}
		n = floor(n * 1.0 / 2);
		cnt++;
	}
	cout << cnt;
	return 0;
}
2022/1/26 11:39
加载中...