further @ 2019-10-29 15:43:17
#include<stdio.h>
int main()
{
int k,n;
float s,a;
scanf("%d",&k);
s=0;
a=0;
for(n=1;s<=k;n=n+1){
a=1.0/n;
s=s+a;
}
n=n-1;
printf("%d",n);
return 0;
}
by 茶道先辈 @ 2019-10-29 16:06:43
@further 你们老师是谁?
by further @ 2019-10-29 16:07:05
@黄秉你 ......
by further @ 2019-10-29 16:07:49
@黄秉你 不知名211大学的程序设计课老师
by 茶道先辈 @ 2019-10-29 16:10:32
告诉他,广东省广州市华南师范大学附属中学信息技术科黄秉_教练不同意他的说法!
by further @ 2019-10-29 16:12:46
@黄秉你 大佬nb