一键导入
prime-factorizer
Compute the prime factorization of an integer by executing Python in the sandbox
用 Codex 或 Claude 帮你安装 复制这段 Prompt,粘贴到 Codex、Claude 或其他助手里,让它检查 Skill 页面并帮你完成安装。
菜单
Compute the prime factorization of an integer by executing Python in the sandbox
用 Codex 或 Claude 帮你安装 复制这段 Prompt,粘贴到 Codex、Claude 或其他助手里,让它检查 Skill 页面并帮你完成安装。
基于 SOC 职业分类
Analyze data (e.g. an uploaded CSV/Excel) with pandas and produce a chart or report file, returned to the user as an attachment.
Solve the user's task by writing Python; the harness runs it in an isolated sandbox and returns stdout.
Use when the user asks about using Gemini in an enterprise environment or explicitly mentions Vertex AI, Google Cloud, or Agent Platform. Guides the usage of the Gemini API on Agent Platform with the Google Gen AI SDK. Covers SDK usage (Python, JS/TS, Go, Java, C#), capabilities like multimodal inputs, tools, media generation, caching, batch prediction, and Live API.
Manages datasets, tables, and jobs in BigQuery, and integrates with BigQuery ML and Gemini for advanced data analytics and AI-driven insights. Use when you need to interact with BigQuery, run SQL queries, manage BigQuery resources, or leverage BigQuery's built-in ML capabilities. Also use when performing data analysis, ingesting data into BigQuery, or developing AI applications on BigQuery.
Echo the user input back verbatim
Reverse the user input string
| name | prime-factorizer |
| description | Compute the prime factorization of an integer by executing Python in the sandbox |
| when_to_use | When the user asks to factorize a number, find prime factors, or for a prime factorization |
When the user asks for the prime factors (or prime factorization) of an integer N, use your code execution tool to run Python in the sandbox. Substitute the user's number for N, run this exactly:
from collections import Counter
def prime_factors(n):
n = int(n)
factors = []
d = 2
while d * d <= n:
while n % d == 0:
factors.append(d)
n //= d
d += 1
if n > 1:
factors.append(n)
return factors
N = 360 # <-- replace with the user's number
pf = prime_factors(N)
c = Counter(pf)
pretty = " x ".join(f"{p}^{e}" if e > 1 else f"{p}" for p, e in sorted(c.items()))
print(f"{N} = {pretty} (prime factors: {pf})")
Always actually execute the code in the sandbox (do not compute it in your head).
Your final reply MUST be the exact printed result line (for example:
360 = 2^3 x 3^2 x 5 (prime factors: [2, 2, 2, 3, 3, 5])). Do not reply with a
summary of your steps.