60分向大佬求助!
查看原帖
60分向大佬求助!
671602
taotao09楼主2022/7/19 18:53
#include<iostream>
using namespace std;
int main() 
{    
  int k,n=0; 
  float sn=0;
  cin>>k;
  while (sn<=k){
  	n++;
	sn+=(float)1/n;
  }
  cout<<n;
  return 0; 
} 

求各位大佬看看为什么才60分

2022/7/19 18:53
加载中...