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