seven4720 @ 2022-01-23 23:50:35
#include<stdio.h>
int main()
{
int k,n,i;
double Sn=0.0;
scanf("%d",&k);
while(Sn<=k)
{
i=1;
Sn+=1.0/i;
i++;
}
n=i-1;
printf("保证Sn>k的最小的n是%d",n);
}
by レムです @ 2022-01-24 03:13:22
你的输出不用这么详细...读题啊。
by ExplodingKonjac @ 2022-01-24 07:17:50
请左转 P1001 题目背景