这种方法为什么不行?

P1423 小玉在游泳

希望更丰富的展现?使用Markdown
by 33028120040712wcl @ 2019-02-11 22:12:42


把long double 换成double
by BCZSX @ 2019-02-11 22:15:31


@[建建丶](/space/show?uid=156495)
by BCZSX @ 2019-02-11 22:15:51


@[BCZSX](/space/show?uid=126669) 还是不行啊,输入4.3,结果出来几十万
by 建建丶 @ 2019-02-11 22:29:39


怎么会呢?我用你的代码把long double改成double 就AC了呀
by BCZSX @ 2019-02-11 22:31:43


还有为什么你的include<cstdio>没有‘#’号@建建、
by BCZSX @ 2019-02-11 22:32:28


@[建建丶](/space/show?uid=156495)
by BCZSX @ 2019-02-11 22:32:43


@[BCZSX](/space/show?uid=126669) 可能是没复制进去,
by 建建丶 @ 2019-02-11 22:36:42


这不是你的代码吗?我就把long double改了一下呀!@[建建丶](/space/show?uid=156495) ```cpp #include<iostream> #include<cstdio> using namespace std; int main() { int i; double x,d=0,s=2; scanf("%lf",&x); while(d<x) { d+=s; i++; s*=0.98; } printf("%d",i); return 0; } ```
by BCZSX @ 2019-02-11 22:38:45


@[BCZSX](/space/show?uid=126669) 洛谷里输进去ac了,但是在c++哪个软件里结果有问题啊
by 建建丶 @ 2019-02-11 22:38:57


| 下一页