271 条题解
-
0雨,纷飞 LV 8 @ 2012-08-02 15:18:52
编译通过...
├ 测试数据 01:答案正确... 0ms
├ 测试数据 02:答案正确... 0ms
├ 测试数据 03:答案正确... 0ms
├ 测试数据 04:答案正确... 0ms
├ 测试数据 05:答案正确... 0ms
---|---|---|---|---|---|---|---|-
Accepted 有效得分:100 有效耗时:0ms点击查看代码
-
02010-07-22 16:40:39@
var s,k,n:longint; Sn:real;
begin
read(k);
repeat
n:=n+1;
Sn:=Sn+1/n;
until Sn>k;
write(n);
end.
10行搞定的程序 这么水
开始没注意范围
我的AC啊 -
02010-07-05 17:40:30@
var
k, i : longint;
s : real;
begin
readln(k);
s := 0;
i := 1;
while s -
02010-07-04 09:24:12@
我不是乖孩子………………
#include
#include
using namespace std;
int n,a[16]={0,2,4,11,31,83,227,616,1674,4550,12367,33617,91380,248397,675214,1835421};
int main()
{
scanf("%d",&n);
printf("%d",a[n]);
return 0;
}
看看 啥叫短代码………………谁更短?
这种思路n到30都没问题的,现场算出来,这时候没人限制时间,你让电脑算他一分钟,考试时骗分即可。(别拍,你敢说这不是最优算法?) -
02010-04-09 13:13:32@
program jj;
var
n:longint;
k:integer;
s:real;
begin
read(k);
n:=0;s:=0;
repeat
inc(n);
s:=s+1/n;
until s>k;
write(n);
end. -
02010-04-05 11:13:23@
定义范围10001的数组,赋初值0,挖掉部分为1,再从1到N,如果0就++
-
02010-04-02 18:11:56@
#include
using namespace std;
int main()
{double n=1,k,m=0;
cin>>k;while(m
-
02010-04-02 18:06:24@
#include
using namespace std;
int main()
{double n=1,k,s=0,i=0;
cin>>k;
while(s -
02010-04-02 17:54:43@
#include
using namespace std;
int main()
{
int k,i=0,s=0;
cin>>k;
while(s -
02010-04-01 19:50:17@
var k,n:longint;
s :real;
begin
s:=0;
k:=0;
readln(n);
if (n>=1) and (n -
02010-03-16 22:24:50@
var n,k:longint;
s :real;
begin
readln(k);
s:=0;
n:=0;
repeat
n:=n+1;
s:=s+1/n;
until s>k;
writeln(n);
end. -
02010-03-16 19:42:03@
program abc;
var k,n:longint;
s:real;
begin
readln(k);
repeat
n:=n+1;
s:=s+1/n;
until s>k;
writeln(n);
end. -
02010-03-13 17:28:25@
var
k:integer;
n:longint;
Sn:real;
begin
read(k);
n:=0;
Sn:=0;
while Sn -
02009-11-09 13:05:35@
Vijos就像一个水桶,里面灌满了水题...
而人生就像一张茶几,上面摆满了悲剧... -
02009-11-08 20:42:09@
#include
using namespace std;
int main()
{
double k,i=0,s=0;
cin>>k;
while (s -
02009-11-08 12:47:46@
program p1127;
var
s:real;
k,n:longint;
begin
s:=0.0;n:=0;
readln(k);
while s -
02009-11-01 22:37:43@
我悲剧了。
我被这道水题,给淹了我的AC率啊...............
悲剧啊...........
-
02009-10-30 13:44:10@
var
s:double;
i,n,k:longint;
begin
readln(k);
n:=1; s:=1;
while s -
02009-10-22 21:29:06@
#include
int main()
{int n=1;
int k;
double s=1;
scanf("%d",&k);
while(s -
02009-10-19 17:40:38@
#include
#include
#include
using namespace std;
int main()
{
int n=1,k;
double s=0;
cin>>k;
for(;s