Skip to content

Instantly share code, notes, and snippets.

@butchi
Last active August 29, 2015 14:11
Show Gist options
  • Save butchi/45458ea0e9be4b07d174 to your computer and use it in GitHub Desktop.
Save butchi/45458ea0e9be4b07d174 to your computer and use it in GitHub Desktop.
No.106 素数が嫌い!2
(* http://yukicoder.me/problems/no/106 *)
(* TLEで失敗しました。 *)
f[n_, k_] := Length[Select[Table[Length[FactorInteger[m]], {m, 2, n}], # >= k &]]
f[2, 1]
f[4, 2]
f[1000, 4]
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment