結果
問題 |
No.312 置換処理
|
ユーザー |
![]() |
提出日時 | 2016-09-11 17:01:43 |
言語 | Fortran (gFortran 14.2.0) |
結果 |
WA
|
実行時間 | - |
コード長 | 430 bytes |
コンパイル時間 | 301 ms |
コンパイル使用メモリ | 32,768 KB |
実行使用メモリ | 10,112 KB |
最終ジャッジ日時 | 2024-11-17 03:31:16 |
合計ジャッジ時間 | 1,859 ms |
ジャッジサーバーID (参考情報) |
judge3 / judge1 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
other | AC * 17 WA * 28 |
ソースコード
program main implicit none integer*8::N,upper,i,j integer*8,allocatable::furui(:) read *,N do if(MOD(N,2).eq.1) exit N = N/2 end do upper = INT(SQRT(DBLE(N)+1)) allocate(furui(3:upper)) furui = 0 do i=3,upper,2 if(furui(i).ne.0) cycle if(MOD(N,i).eq.0) then print '(i0)',i return end if do j=i+i,upper,i furui(j) = 1 end do end do end program main