美しい整数の世界 (780レス)
美しい整数の世界 http://rio2016.5ch.net/test/read.cgi/math/1686749616/
上
下
前
次
1-
新
通常表示
512バイト分割
レス栞
379: 132人目の素数さん [sage] 2024/03/04(月) 16:54:10.82 ID:2kdytQ4B R言語コードのサラダ > isprime=\(n){ + pmax=floor(sqrt(n)) + p=(1:pmax)[-outer(2:pmax,2:pmax)][-1] + !any(n%%p==0) + } > isprime=Vectorize(isprime) > isprime(101:463) |> sum() [1] 65 実行時間は0.010秒未満 > system.time(isprime(101:463) |> sum()) user system elapsed 0 0 0 > http://rio2016.5ch.net/test/read.cgi/math/1686749616/379
メモ帳
(0/65535文字)
上
下
前
次
1-
新
書
関
写
板
覧
索
設
栞
歴
あと 401 レスあります
スレ情報
赤レス抽出
画像レス抽出
歴の未読スレ
AAサムネイル
Google検索
Wikipedia
ぬこの手
ぬこTOP
0.055s