题解

139 条题解

  • 0
    @ 2009-07-20 20:32:29

    编译通过...

    ├ 测试数据 01:答案正确... 0ms

    ├ 测试数据 02:答案正确... 650ms

    ├ 测试数据 03:答案正确... 0ms

    ├ 测试数据 04:答案正确... 0ms

    ├ 测试数据 05:答案正确... 681ms

    ├ 测试数据 06:答案正确... 0ms

    ├ 测试数据 07:答案正确... 197ms

    ├ 测试数据 08:答案正确... 353ms

    ├ 测试数据 09:答案正确... 697ms

    ├ 测试数据 10:答案正确... 353ms

    ---|---|---|---|---|---|---|---|-

    Accepted 有效得分:100 有效耗时:2931ms

    对于这题,一直很崇拜那些搞出6000+ms的大牛们。。。我捉摸着就是赶上6K也搞不出吧。。。

  • 0
    @ 2009-07-18 20:10:10

    编译通过...

    ├ 测试数据 01:答案正确... 0ms

    ├ 测试数据 02:答案正确... 666ms

    ├ 测试数据 03:答案正确... 0ms

    ├ 测试数据 04:答案正确... 0ms

    ├ 测试数据 05:答案正确... 681ms

    ├ 测试数据 06:答案正确... 0ms

    ├ 测试数据 07:答案正确... 181ms

    ├ 测试数据 08:答案正确... 353ms

    ├ 测试数据 09:答案正确... 666ms

    ├ 测试数据 10:答案正确... 353ms

    ---|---|---|---|---|---|---|---|-

    Accepted 有效得分:100 有效耗时:2900ms

    啧啧。。这数据。。。

  • 0
    @ 2009-07-17 20:21:42

    编译通过...

    ├ 测试数据 01:答案正确... 681ms

    ├ 测试数据 02:答案正确... 681ms

    ├ 测试数据 03:答案正确... 697ms

    ├ 测试数据 04:答案正确... 666ms

    ├ 测试数据 05:答案正确... 681ms

    ├ 测试数据 06:答案正确... 681ms

    ├ 测试数据 07:答案正确... 681ms

    ├ 测试数据 08:答案正确... 681ms

    ├ 测试数据 09:答案正确... 666ms

    ├ 测试数据 10:答案正确... 681ms

    ---|---|---|---|---|---|---|---|-

    Accepted 有效得分:100 有效耗时:6796ms

    楼下的那位,时间还我长吧

  • 0
    @ 2009-07-17 13:50:11

    编译通过...

    ├ 测试数据 01:答案正确... 650ms

    ├ 测试数据 02:答案正确... 697ms

    ├ 测试数据 03:答案正确... 666ms

    ├ 测试数据 04:答案正确... 666ms

    ├ 测试数据 05:答案正确... 681ms

    ├ 测试数据 06:答案正确... 666ms

    ├ 测试数据 07:答案正确... 681ms

    ├ 测试数据 08:答案正确... 697ms

    ├ 测试数据 09:答案正确... 681ms

    ├ 测试数据 10:答案正确... 697ms

    ---|---|---|---|---|---|---|---|-

    Accepted 有效得分:100 有效耗时:6782ms

    var

    s,n,i,j:longint;

    a:array[1..20000]of longint;

    begin

    readln(n);

    for i:=1 to 20000 do

    begin

    s:=0;

    for j:=1 to i do

    if i mod j=0 then s:=s+1;

    a[i]:=s;

    end;

    for i:=1 to 20000 do

    if a[i]=n then

    begin writeln(i);halt;end;

    writeln('NO SOLUTION');

    end.

    我的程序这样也过了,没办法 评测机太好了

  • 0
    @ 2009-07-15 15:30:23

    这样都可以AC.数据好弱阿.

    var i,j,k,s,t:longint;

    begin

    readln(k);

    for i:=1 to 20000 do

    begin

    s:=0;

    for j:=1 to i do

    if i mod j=0 then inc(s);

    if s=k then

    begin

    t:=i;

    writeln(t);

    break;

    end;

    end;

    if t=0 then writeln('NO SOLUTION');

    end.

    ├ 测试数据 01:答案正确... 0ms

    ├ 测试数据 02:答案正确... 697ms

    ├ 测试数据 03:答案正确... 0ms

    ├ 测试数据 04:答案正确... 0ms

    ├ 测试数据 05:答案正确... 681ms

    ├ 测试数据 06:答案正确... 0ms

    ├ 测试数据 07:答案正确... 197ms

    ├ 测试数据 08:答案正确... 338ms

    ├ 测试数据 09:答案正确... 681ms

    ├ 测试数据 10:答案正确... 338ms

  • 0
    @ 2009-07-12 09:56:26

    纯净水,更健康

  • 0
    @ 2009-06-17 22:53:04

    water^1000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000

  • 0
    @ 2009-06-13 17:36:42

    for j:=1 to i do if i mod j=0 then inc(n);

    开始一样的 WA了一个点....

    后来该 to trunc(sqrt(i)) 的 10 分

    后来该回来 to i AC了......

    雷到了......

  • 0
    @ 2009-06-12 21:19:26

    编译通过...

    ├ 测试数据 01:答案正确... 0ms

    ├ 测试数据 02:答案正确... 0ms

    ├ 测试数据 03:答案正确... 0ms

    ├ 测试数据 04:答案正确... 0ms

    ├ 测试数据 05:答案正确... 0ms

    ├ 测试数据 06:答案正确... 0ms

    ├ 测试数据 07:答案正确... 0ms

    ├ 测试数据 08:答案正确... 0ms

    ├ 测试数据 09:答案正确... 0ms

    ├ 测试数据 10:答案正确... 0ms

    ---|---|---|---|---|---|---|---|-

    Accepted 有效得分:100 有效耗时:0ms

  • 0
    @ 2009-06-04 15:24:44

    var k,n,i,min:integer;

    function g(jj:integer):integer;

    var s,i:integer;

    begin

    s:=0;

    for i:=1 to jj do if jj mod i =0 then inc(s);

    g:=s;

    end;

    begin

    min:=20000;

    readln(k);

    for n:=1 to 20000 do

    begin

    if (g(n)=k)

    then

    begin

    min:=n;

    break;

    end;

    end;

    if min=20000 then writeln('NO SOLUTION')

    else

    writeln(min);

    end.

  • 0
    @ 2009-05-29 14:58:08

    第一次写的时候,SOLUTION打成了SOLUNTION……,囧了个70……

    555……我的AC率……

    {——————————————————————————————}

    编译通过...

    ├ 测试数据 01:答案正确... 0ms

    ├ 测试数据 02:答案正确... 0ms

    ├ 测试数据 03:答案正确... 0ms

    ├ 测试数据 04:答案正确... 0ms

    ├ 测试数据 05:答案正确... 0ms

    ├ 测试数据 06:答案正确... 0ms

    ├ 测试数据 07:答案正确... 0ms

    ├ 测试数据 08:答案正确... 0ms

    ├ 测试数据 09:答案正确... 0ms

    ├ 测试数据 10:答案正确... 0ms

    ---|---|---|---|---|---|---|---|-

    Accepted 有效得分:100 有效耗时:0ms

    var

    s,h:array[0..20000]of longint;

    i,j,k,n:integer;

    begin

    readln(n);

    for i:=1 to 20000 do h[i]:=maxlongint;

    fillchar(s,sizeof(s),0);

    for i:=1 to 20000 do

    begin

    for j:=1 to trunc(sqrt(i)) do

    if i mod j=0 then inc(s[i],2);

    if j*j=i then dec(s[i]);

    if h[s[i]]>i then h[s[i]]:=i;

    end;

    if h[n]

  • 0
    @ 2009-05-17 09:21:02

    var

    i,j,n,k:longint;

    begin

    readln(n);

    repeat

    inc(i);

    for j:=1 to trunc(sqrt(i)) do

    if trunc(i/j)=(i/j) then inc(k,2);

    if trunc(sqrt(i))=sqrt(i) then dec(k);

    if k=n then

    begin writeln(i);halt;end;

    if i>20000 then begin

    writeln('NO SOLUTION');halt;end;

    k:=0;

    until false;

    end.

  • 0
    @ 2009-03-22 01:14:58

    编译通过...

    ├ 测试数据 01:答案正确... 0ms

    ├ 测试数据 02:答案正确... 0ms

    ├ 测试数据 03:答案正确... 0ms

    ├ 测试数据 04:答案正确... 0ms

    ├ 测试数据 05:答案正确... 0ms

    ├ 测试数据 06:答案正确... 0ms

    ├ 测试数据 07:答案正确... 0ms

    ├ 测试数据 08:答案正确... 0ms

    ├ 测试数据 09:答案正确... 0ms

    ├ 测试数据 10:答案正确... 0ms

    ---|---|---|---|---|---|---|---|-

    Accepted 有效得分:100 有效耗时:0ms

    #include "stdio.h"

    int main()

    {

    int i,j,k,x[20001]={0};

    scanf("%d",&k);

    for(i=1;i

  • 0
    @ 2009-03-14 18:50:40

    我汗.....穷举....

  • 0
    @ 2009-03-11 13:45:28

    var

    k,i,j:longint;

    ls:array[1..20000] of longint;

    begin

    readln(k);

    for i:=1 to 20000 do

       for j:=1 to 20000 div i do

         inc(ls);

    for i:=1 to 20000 do

       if ls[i]=k then

         begin

          write(i);

          halt;

         end;

    write('NO SOLUTION');

    end.

  • 0
    @ 2009-02-27 13:23:51

    From 风De叛逆

    分解因式

    编译通过...

    ├ 测试数据 01:答案正确... 0ms

    ├ 测试数据 02:答案正确... 0ms

    ├ 测试数据 03:答案正确... 0ms

    ├ 测试数据 04:答案正确... 0ms

    ├ 测试数据 05:答案正确... 0ms

    ├ 测试数据 06:答案正确... 0ms

    ├ 测试数据 07:答案正确... 0ms

    ├ 测试数据 08:答案正确... 0ms

    ├ 测试数据 09:答案正确... 0ms

    ├ 测试数据 10:答案正确... 0ms

    ---|---|---|---|---|---|---|---|-

    Accepted 有效得分:100 有效耗时:0ms

    program p1335;

    var

    n:integer;b:boolean;

    note:array[1..9,1..9]of 1..9;

    procedure init;

    var

    i,j:integer;

    begin

    read(n);

    end;

    procedure readshuodu;

    var

    i,j:integer;

    begin

    b:=true;

    for i:=1 to 9 do

    for j:=1 to 9 do

    read(note);

    end;

    procedure panduanhang;

    var

    i,j:integer;

    ishave:array[1..9]of 0..2;

    begin

    if b=true then

    begin

    for i:=1 to 9 do

    begin

    for j:=1 to 9 do

    ishave[note]:=1;

    for j:=1 to 9 do

    if ishave[j]=0

    then b:=false;

    end;

    end;

    end;

    procedure panduanlie;

    var

    i,j:integer;

    ishave:array[1..9]of 0..2;

    begin

    if b=true then

    begin

    for i:=1 to 9 do

    begin

    for j:=1 to 9 do

    ishave[note[j,i]]:=1;

    for j:=1 to 9 do

    if ishave[j]=0

    then b:=false;

    end;

    end;

    end;

    procedure panduanxiaozhengfang;

    var

    i,j,i1,j1:integer;

    ishave:array[1..9]of 0..1;

    begin

    fillchar(ishave,sizeof(ishave),0);

    if b=true

    then

    begin

    while (i

  • 0
    @ 2009-01-29 11:35:03

    还是交表爽啊~

    附打表程序:

    #include

    using namespace std;

    ofstream cout("r.txt");

    int ks[80];

    int main()

    {

    for(int N = 1;N

  • 0
    @ 2009-01-29 09:39:11

    最朴素的枚举=ac!

    10th

  • 0
    @ 2009-01-28 18:49:31

    Accepted 有效得分:100 有效耗时:0ms

    穷举 不知道楼下没秒杀的咋搞的

    建议改一下难度…… 我一开始还以为我没读清题

  • 0
    @ 2008-11-21 22:06:33

    var

    k,i,j:longint;

    ls:array[1..20000] of longint;

    begin

    readln(k);

    for i:=1 to 20000 do

    for j:=1 to 20000 div i do

    nc(ls);

    for i:=1 to 20000 do

    if ls[i]=k then

    begin

    write(i);

    halt;

    end;

    write('NO SOLUTION');

    end.

信息

ID
1229
难度
4
分类
其他 | 数学 点击显示
标签
(无)
递交数
2036
已通过
939
通过率
46%
被复制
4
上传者