結果

問題 No.106 素数が嫌い!2
ユーザー jjjj
提出日時 2016-08-30 20:09:32
言語 Fortran
(gFortran 13.2.0)
結果
AC  
実行時間 28 ms / 5,000 ms
コード長 332 bytes
コンパイル時間 1,176 ms
コンパイル使用メモリ 32,384 KB
実行使用メモリ 10,112 KB
最終ジャッジ日時 2024-04-26 18:11:38
合計ジャッジ時間 1,339 ms
ジャッジサーバーID
(参考情報)
judge2 / judge3
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 12 ms
6,272 KB
testcase_01 AC 1 ms
5,376 KB
testcase_02 AC 1 ms
5,376 KB
testcase_03 AC 1 ms
5,376 KB
testcase_04 AC 11 ms
6,272 KB
testcase_05 AC 28 ms
10,112 KB
testcase_06 AC 28 ms
10,112 KB
testcase_07 AC 27 ms
10,112 KB
testcase_08 AC 2 ms
5,376 KB
testcase_09 AC 2 ms
5,376 KB
testcase_10 AC 27 ms
9,984 KB
testcase_11 AC 10 ms
5,760 KB
testcase_12 AC 25 ms
9,728 KB
testcase_13 AC 1 ms
5,376 KB
testcase_14 AC 1 ms
5,376 KB
testcase_15 AC 1 ms
5,376 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

program main
  implicit none
  integer::N,K
  integer::i,j
  integer,allocatable::num(:) !number of soinsu
  read *,N,K
  allocate(num(N))
  num = 0

  do i=2,N
     if(num(i).eq.0) then !sosuu
        do j=i,N,i
           num(j) = num(j) + 1
        end do
     end if
  end do
  print '(i0)',COUNT(num(2:N).ge.K)
end program main
0