結果

問題 No.371 ぼく悪いプライムじゃないよ
ユーザー jjjj
提出日時 2016-09-03 17:44:54
言語 Fortran
(gFortran 13.2.0)
結果
MLE  
実行時間 -
コード長 433 bytes
コンパイル時間 692 ms
コンパイル使用メモリ 33,280 KB
実行使用メモリ 790,544 KB
最終ジャッジ日時 2024-04-27 15:37:32
合計ジャッジ時間 3,609 ms
ジャッジサーバーID
(参考情報)
judge2 / judge4
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 1 ms
13,756 KB
testcase_01 AC 1 ms
6,940 KB
testcase_02 AC 1 ms
6,940 KB
testcase_03 AC 1 ms
6,940 KB
testcase_04 AC 1 ms
6,944 KB
testcase_05 AC 1 ms
6,940 KB
testcase_06 AC 1 ms
6,944 KB
testcase_07 AC 1 ms
6,944 KB
testcase_08 AC 1 ms
6,940 KB
testcase_09 AC 1 ms
6,940 KB
testcase_10 AC 1 ms
6,940 KB
testcase_11 AC 1 ms
6,940 KB
testcase_12 AC 1 ms
6,940 KB
testcase_13 AC 1 ms
6,940 KB
testcase_14 AC 1 ms
6,940 KB
testcase_15 AC 1 ms
6,944 KB
testcase_16 AC 1 ms
6,944 KB
testcase_17 AC 1 ms
6,940 KB
testcase_18 AC 1 ms
6,944 KB
testcase_19 AC 1 ms
6,944 KB
testcase_20 AC 10 ms
10,068 KB
testcase_21 AC 1 ms
6,940 KB
testcase_22 MLE -
testcase_23 -- -
testcase_24 -- -
testcase_25 -- -
testcase_26 -- -
testcase_27 -- -
testcase_28 -- -
testcase_29 -- -
testcase_30 -- -
testcase_31 -- -
testcase_32 -- -
testcase_33 -- -
testcase_34 -- -
testcase_35 -- -
testcase_36 -- -
testcase_37 -- -
testcase_38 -- -
testcase_39 -- -
testcase_40 -- -
testcase_41 -- -
testcase_42 -- -
testcase_43 -- -
testcase_44 -- -
testcase_45 -- -
権限があれば一括ダウンロードができます

ソースコード

diff #

program main
  implicit none
  integer*8::L,H,up,i,j,bad
  integer*8,allocatable::dp(:),dp2(:)
  read *,L,H
  up = INT(SQRT(DBLE(H)))
  allocate(dp(up),dp2(L:H))
  dp  = 0
  dp2 = 0
  bad = 1
  do i=2,up
     if(dp(i).ne.0) cycle
     do j=i+i,up,i
        dp(j) = 1
     end do

     do j=((L+i-1)/i)*i,H,i
        if(dp2(j).ne.0) cycle
        dp2(j) = 1
        bad    = j
     end do
  end do

  print'(i0)',bad
end program main
0