Maximum-Cup 2013

Submission #3634485

Source codeソースコード

var
  x,y,i,j,n,max,k:longint;
  b:array[0..100000000] of boolean;
  a:array[0..100000000] of longint;
begin
  readln(a[1]);
  x:=1;
  max:=a[1];
  while a[x]<>0 do
  begin
    x:=x+1;
    readln(a[x]);
    if a[x]>max then max:=a[x];
  end;
  b[1]:=true;
  for i:=2 to trunc(sqrt(max)) do
  begin
    if b[i]=false then
    for j:=2 to max div i do b[i*j]:=true;
  end;
  for i:=1 to x-1 do
  begin
    j:=2;
    k:=a[i];
    while k<>1 do
    begin
      while k mod j=0 do begin k:=k div j;end;
      j:=j+1;
    end;
    writeln(j-1);
  end;
end.

Submission

Task問題 B - Working for the World
User nameユーザ名 luogu_bot5
Created time投稿日時
Language言語 Pascal (FPC 2.6.2)
Status状態 TLE
Score得点 0
Source lengthソースコード長 550 Byte
File nameファイル名
Exec time実行時間 ms
Memory usageメモリ使用量 -

Compiler messageコンパイルメッセージ

/usr/bin/ld.bfd: warning: ./link.res contains output sections; did you forget -T?

Test case

Set

Set name Score得点 / Max score Cases
All 0 / 100 00-sample,10-minimum,11-maximum,12-little,13-large,14-middle,15-zero,50-random00,50-random01,50-random02,50-random03,50-random04,50-random05,50-random06,50-random07,50-random08,50-random09,50-random10,50-random11,50-random12,50-random13,50-random14,50-random15,50-random16,50-random17,50-random18,50-random19

Test case

Case name Status状態 Exec time実行時間 Memory usageメモリ使用量
00-sample AC 91 ms 22528 KB
10-minimum AC 1 ms 2176 KB
11-maximum AC 1060 ms 98304 KB
12-little AC 1 ms 2176 KB
13-large TLE
14-middle AC 1070 ms 98176 KB
15-zero AC 1 ms 2176 KB
50-random00 TLE
50-random01 AC 1747 ms 98176 KB
50-random02 TLE
50-random03 AC 1537 ms 98304 KB
50-random04 AC 1505 ms 86016 KB
50-random05 TLE
50-random06 TLE
50-random07 AC 1257 ms 92160 KB
50-random08 AC 1350 ms 98304 KB
50-random09 TLE
50-random10 AC 1192 ms 98176 KB
50-random11 TLE
50-random12 AC 1394 ms 96256 KB
50-random13 TLE
50-random14 AC 1950 ms 98304 KB
50-random15 AC 1576 ms 98304 KB
50-random16 AC 1895 ms 98304 KB
50-random17 AC 1939 ms 98304 KB
50-random18 TLE
50-random19 AC 1254 ms 98304 KB