<!DOCTYPE html>
<!-- saved from url=(0038)https://zhuanlan.zhihu.com/p/351015644 -->
<html lang="zh" data-hairline="true" class="itcauecng" data-theme="light" data-rh="data-theme" style=""><head><meta http-equiv="Content-Type" content="text/html; charset=UTF-8"><title>【PTA】C/C++求n以内最大的k个素数以及它们的和 - 知乎</title><meta name="viewport" content="width=device-width,initial-scale=1,maximum-scale=1"><meta name="renderer" content="webkit"><meta name="force-rendering" content="webkit"><meta http-equiv="X-UA-Compatible" content="IE=10,chrome=1"><meta name="google-site-verification" content="FTeR0c8arOPKh8c5DYh_9uu98_zJbaWw53J-Sch9MTg"><meta data-rh="true" name="keywords" content="浙大PAT,C语言函数,C / C++"><meta data-rh="true" name="description" content="本题要求计算并输出不超过n的最大的k个素数以及它们的和。 输入格式:输入在一行中给出n(10≤n≤10000)和k(1≤k≤10)的值。 输出格式:在一行中按下列格式输出: 素数1+素数2+…+素数k=总和值其中素数按递减顺序输出…"><meta data-rh="true" property="og:title" content="【PTA】C/C++求n以内最大的k个素数以及它们的和"><meta data-rh="true" property="og:url" content="https://zhuanlan.zhihu.com/p/351015644"><meta data-rh="true" property="og:description" content="本题要求计算并输出不超过n的最大的k个素数以及它们的和。 输入格式:输入在一行中给出n(10≤n≤10000)和k(1≤k≤10)的值。 输出格式:在一行中按下列格式输出: 素数1+素数2+…+素数k=总和值其中素数按递减顺序输出…"><meta data-rh="true" property="og:image" content="https://picx.zhimg.com/v2-c354cb292715ff1be999f2731e95184f_r.jpg?source=172ae18b"><meta data-rh="true" property="og:type" content="article"><meta data-rh="true" property="og:site_name" content="知乎专栏"><link data-rh="true" rel="apple-touch-icon" href="https://static.zhihu.com/heifetz/assets/apple-touch-icon-152.81060cab.png"><link data-rh="true" rel="apple-touch-icon" href="https://static.zhihu.com/heifetz/assets/apple-touch-icon-152.81060cab.png" sizes="152x152"><link data-rh="true" rel="apple-touch-icon" href="https://static.zhihu.com/heifetz/assets/apple-touch-icon-120.d5793cac.png" sizes="120x120"><link data-rh="true" rel="apple-touch-icon" href="https://static.zhihu.com/heifetz/assets/apple-touch-icon-76.7abf3393.png" sizes="76x76"><link data-rh="true" rel="apple-touch-icon" href="https://static.zhihu.com/heifetz/assets/apple-touch-icon-60.362a8eac.png" sizes="60x60"><link crossorigin="" rel="shortcut icon" type="image/x-icon" href="https://static.zhihu.com/heifetz/favicon.ico"><link crossorigin="" rel="search" type="application/opensearchdescription+xml" href="https://static.zhihu.com/heifetz/search.xml" title="知乎"><link rel="dns-prefetch" href="https://static.zhimg.com/"><link rel="dns-prefetch" href="https://pica.zhimg.com/"><link rel="dns-prefetch" href="https://picx.zhimg.com/"><link rel="dns-prefetch" href="https://pic1.zhimg.com/"><link rel="dns-prefetch" href="https://pic2.zhimg.com/"><link rel="dns-prefetch" href="https://pic3.zhimg.com/"><link rel="dns-prefetch" href="https://pic4.zhimg.com/"><link rel="dns-prefetch" href="https://static.zhihu.com/"><style data-emotion-css="9mvwt1">:root{--zhc-padding-horizontal:20px;--zhc-padding-vertical:16px;--zhc-notification-top:75px;--app-padding:16px;--app-header-height:52px;--app-max-width:640px;--app-width:1000px;--app-font-size:15px;}</style><script nonce="" data-web-reporter-config="{"platform":"web","project":"heifetz"}">!function(e,t){"object"==typeof exports&&"undefined"!=typeof module?t(exports):"function"==typeof define&&define.amd?define(["exports"],t):t((e=e||self).webReporter={})}(this,function(e){"use strict";var t={},n=!1,o=function(){var e,o,r,a,i;return n||(e=document.querySelector("script[data-web-reporter-config]"),o=e&&e.dataset.webReporterConfig||"{}",r=JSON.parse(o),a=r.platform,i=r.project,t={platform:a,project:i},n=!0),t};function r(e){return a(function(){return localStorage.getItem(e)})()}function a(e){return function(){try{return e.apply(void 0,arguments)}catch(e){}}}var i=a(function(e,t){var n={platform:"web",project:o().project,clientTimestamp:+new Date};!function(e,t,n){"1"===r("weber:logenabled")&&console.log("[web-reporter]%o",{type:e,base:t,data:n})}(e,n,t),function(e,t){var n=btoa(JSON.stringify(t));if("undefined"!=typeof Blob&&window.navigator&&window.navigator.sendBeacon){var o=new Blob([n],{type:"text/plain"});navigator.sendBeacon(e,o)}else{var r=new XMLHttpRequest;r.open("POST",e),r.withCredentials=!1,r.setRequestHeader("Content-Type","text/plain;charset=UTF-8"),r.send(n)}}(r("weber:api")||"https://apm.zhihu.com/collector/web_json",{type:e,base:n,data:t})});e.report=i,Object.defineProperty(e,"__esModule",{value:!0})});
</script><link href="./【PTA】C_C++求n以内最大的k个素数以及它们的和_files/1566.216a26f4.cfb4ec8879cc0ffbf7ad.css" crossorigin="" rel="stylesheet"><link href="./【PTA】C_C++求n以内最大的k个素数以及它们的和_files/column.216a26f4.62a2225227c16854bc46.css" crossorigin="" rel="stylesheet"><link rel="stylesheet" type="text/css" href="./【PTA】C_C++求n以内最大的k个素数以及它们的和_files/user-hover-card.216a26f4.0e3930e2ffc649f7ed8b.css" crossorigin="anonymous"><link rel="stylesheet" type="text/css" href="./【PTA】C_C++求n以内最大的k个素数以及它们的和_files/GoodsRecommendGoodsCardList.216a26f4.d95ce79191cdf8d7ac28.css" crossorigin="anonymous"><link rel="stylesheet" type="text/css" href="./【PTA】C_C++求n以内最大的k个素数以及它们的和_files/report_modals.216a26f4.370935343bb8c3bca346.css" crossorigin="anonymous"><link rel="stylesheet" type="text/css" href="./【PTA】C_C++求n以内最大的k个素数以及它们的和_files/632.216a26f4.763aa082a89da06da92e.css" crossorigin="anonymous"><link rel="stylesheet" type="text/css" href="./【PTA】C_C++求n以内最大的k个素数以及它们的和_files/3433.216a26f4.1c95267e7d0f4f116db2.css" crossorigin="anonymous"><link rel="stylesheet" type="text/css" href="./【PTA】C_C++求n以内最大的k个素数以及它们的和_files/ECommerceAd.216a26f4.c90979d08ed65b86fc8f.css" crossorigin="anonymous"><link rel="stylesheet" type="text/css" href="./【PTA】C_C++求n以内最大的k个素数以及它们的和_files/1468.216a26f4.101bb14a2c1d8d20b744.css" crossorigin="anonymous"><link rel="stylesheet" type="text/css" href="./【PTA】C_C++求n以内最大的k个素数以及它们的和_files/EditableV2.216a26f4.6c9301eaad8df7e50cb2.css" crossorigin="anonymous"><script nonce="">!function(){"use strict";!function(e,n){var r=[];function t(e){return function(){r.push([e,arguments])}}n.Raven={captureException:t("captureException"),captureMessage:t("captureMessage"),captureBreadcrumb:t("captureBreadcrumb")};var a,o,c,i,s,u="undefined"!=typeof DOMError;function d(e){var n=e instanceof Error||e instanceof ErrorEvent||u&&e instanceof DOMError||e instanceof DOMException;Raven.captureException(n?e:new Error(e.message||e.reason))}n.addEventListener("unhandledrejection",d),n.addEventListener("error",d,!0),a=e.src,o=e,c=function(){r.forEach(function(e){var n;(n=Raven)[e[0]].apply(n,e[1])}),n.removeEventListener("unhandledrejection",d),n.removeEventListener("error",d,!0)},i=document.head||document.getElementsByTagName("head")[0],(s=document.createElement("script")).crossOrigin=o.crossOrigin,s.dataset.sentryConfig=o["data-sentry-config"],s.onload=c,s.src=a,i.appendChild(s)}({"defer":true,"crossOrigin":"anonymous","src":"https://unpkg.zhimg.com/@cfe/sentry-script@1.3.1/dist/init.js","data-sentry-config":"{\"dsn\":\"https://2d8d764432cc4f6fb3bc78ab9528299d@crash2.zhihu.com/1224\",\"sampleRate\":0.1,\"release\":\"1330-fd13d7d4\",\"ignoreErrorNames\":[\"NetworkError\",\"SecurityError\"],\"ignoreErrorsPreset\":\"ReactApp\",\"tags\":{\"app_name\":\"heifetz\"}}"},wi
没有合适的资源?快使用搜索试试~ 我知道了~
PTAC-C++求n以内最大的k个素数以及它们的和.rar
共43个文件
下载:25个
css:10个
png:2个
0 下载量 155 浏览量
2024-05-16
09:24:38
上传
评论
收藏 1.57MB RAR 举报
温馨提示
求n以内最大的k个素数c 本题要求计算并输出不超过n的最大的k个素数以及它们的和。 输入格式: 输入在一行中给出n(10≤n≤10000)和k(1≤k≤10)的值。 输出格式: 在一行中按下列格式输出: 素数1+素数2+…+素数k=总和值 其中素数按递减顺序输出。若n以内不够k个素数,则按实际个数输出。
资源推荐
资源详情
资源评论
收起资源包目录
【PTA】C_C++求n以内最大的k个素数以及它们的和.rar (43个子文件)
【PTA】C_C++求n以内最大的k个素数以及它们的和
【PTA】C_C++求n以内最大的k个素数以及它们的和_files
lib-83b0f42f.app.e34e650850a4762e3d73.js.下载 34KB
v2-ae61f5d040ee7cbb265f9b3b1299c746_l.jpg 3KB
lib-38cf5c11.app.0ef475c02226ac0ff291.js.下载 36KB
lib-2ec050f6.app.00a95ee9a78fb3962b31.js.下载 38KB
push.js.下载 308B
1468.216a26f4.101bb14a2c1d8d20b744.css 26KB
logo.e049e9b9.png 16KB
js 541B
runtime.app.56a961486be31d49849c.js.下载 11KB
632.216a26f4.763aa082a89da06da92e.css 5KB
EditableV2.216a26f4.6c9301eaad8df7e50cb2.css 33KB
react-dom.production.min.js.下载 118KB
ECommerceAd.216a26f4.c90979d08ed65b86fc8f.css 30KB
column.216a26f4.62a2225227c16854bc46.css 215KB
zap.js.下载 347KB
lib-0e5ce61e.app.b22b78c2be57c983262f.js.下载 40KB
user-hover-card.216a26f4.0e3930e2ffc649f7ed8b.css 22KB
vendor.b2043823c211547b094b.js.下载 196KB
3433.216a26f4.1c95267e7d0f4f116db2.css 17KB
lib-79b5cf47.app.8b6b6bf4b6d894db9b07.js.下载 55KB
lib-75fc9c18.app.3db651c252e14ef6658e.js.下载 58KB
report_modals.216a26f4.370935343bb8c3bca346.css 10KB
init.js.下载 38KB
v2-8bfaf833110fde5cfd818d2c50b939c0_250x0.jpg 27KB
column.app.478d78190db449b02d35.js.下载 1.35MB
lib-330004dc.app.7437cf54ac28fca0e302.js.下载 68KB
v2-c354cb292715ff1be999f2731e95184f_1440w.image 47KB
lib-9b20c40c.app.c60ce7ba42a4e060cc79.js.下载 35KB
1566.216a26f4.cfb4ec8879cc0ffbf7ad.css 168KB
lib-29107295.app.42d07f814b7b05187671.js.下载 68KB
1566.app.d27433f9e7f67444b819.js.下载 1.88MB
wm.3.0.0_33d41777.min.js.下载 88KB
core-optimi.v2.26.1.min.js.下载 425KB
emoticon.js.下载 14KB
aria.js.下载 339KB
load.min.js.下载 34KB
liukanshan-peek.a71ecf3e.png 13KB
GoodsRecommendGoodsCardList.216a26f4.d95ce79191cdf8d7ac28.css 16KB
react-dom-server.browser.production.min.js.下载 20KB
saved_resource.html 149B
hm.js.下载 29KB
react.production.min.js.下载 11KB
【PTA】C_C++求n以内最大的k个素数以及它们的和.html 273KB
共 43 条
- 1
资源评论
比特流1024
- 粉丝: 1961
- 资源: 182
上传资源 快速赚钱
- 我的内容管理 展开
- 我的资源 快来上传第一个资源
- 我的收益 登录查看自己的收益
- 我的积分 登录查看自己的积分
- 我的C币 登录后查看C币余额
- 我的收藏
- 我的下载
- 下载帮助
安全验证
文档复制为VIP权益,开通VIP直接复制
信息提交成功