e,e,e!为啥全是青WA??????

P1035 [NOIP2002 普及组] 级数求和

AFwhcing @ 2020-10-05 12:31:09

代码

#include<bits/stdc++.h>
using namespace std;
int main(){
    int n=1,k;double s=0;
    scanf("%d",&k);
    for(;s<=k;++n) s+=1.0/n;
    printf("%d",n);
    return 0;
}

www,ZENMEGAODE?WTF?


by AFwhcing @ 2020-10-05 12:33:38

楼主很rua,请不要介意。

回复全家欢乐、学业有成、养老金高


by Mine_King @ 2020-10-05 12:33:39

输出的时候要-1


by Trafford1894 @ 2020-10-05 12:57:48

那lz是怎么爆切紫黑题的


by 囧仙 @ 2020-10-05 12:59:37

lz分别切了一道紫黑题,ctj可能性很大(


by orange166 @ 2020-10-05 13:01:17

那lz是怎么爆切紫黑题的


by Trafford1894 @ 2020-10-05 13:05:52

lz解释一下您是如何一遍AC黑题的


by wmy_goes_to_thu @ 2020-10-05 13:12:59

s<=得改成<


by AFwhcing @ 2020-10-08 10:50:47

@wangmaohua20090908 啊?题目是说大于,不是大于等于啊?


by wmy_goes_to_thu @ 2020-10-08 11:03:42

@蒟蒻de小王 我看错了。。


by AFwhcing @ 2020-10-08 11:05:15

@wangmaohua20090908 哈


| 下一页