Classic
Clean & simple
Crystal
Glassmorphism + Neon
Cyberpunk
Neon glitch art
🚫
违规Action检测
禁止Use右键菜单
⚠️ 此Action已被系统记录
1

变量实验1.cpp

📝 Solutions 🔵 仅限 C++
Problems Description
<p class="MsoNormal" style="background: rgb(255,255,255); text-align: left; margin: 5pt 0pt; mso-margin-top-alt: auto; mso-margin-bottom-alt: auto; mso-pagination: widow-orphan"><span style="font-size: 9pt; font-family: Arial; color: rgb(0,0,0); mso-spacerun: 'yes'; mso-font-kerning: 0.0000pt">让我们设想这样一items例子,我要求你在脑子里记住<font face="Arial">5</font><font face="宋体">这items数字,然后再记住</font><font face="Arial">2</font><font face="宋体">这items数字。你已经存储了两items数值在你的记忆里。现在我要求你在我说的Page 一items数值上加</font><font face="Arial">1</font><font face="宋体">,你应该保留</font><font face="Arial">6 </font><font face="宋体">(即</font><font face="Arial">5+1</font><font face="宋体">)和</font><font face="Arial">2</font><font face="宋体">在你的记忆里。现在如果我们将两数相减可以得到结果</font><font face="Arial">4</font><font face="宋体">。</font></span><span style="font-size: 9pt; font-family: Arial; color: rgb(0,0,0); mso-spacerun: 'yes'; mso-font-kerning: 0.0000pt"><o:p></o:p></span></p> <p class="MsoNormal" style="background: rgb(255,255,255); text-align: left; margin: 5pt 0pt; mso-margin-top-alt: auto; mso-margin-bottom-alt: auto; mso-pagination: widow-orphan"><span style="font-size: 9pt; font-family: Arial; color: rgb(0,0,0); mso-spacerun: 'yes'; mso-font-kerning: 0.0000pt">所有这些你在脑子里做的事情与计算机用两items变量可以做的事情非常相似。同样的处理过程用<font face="Arial">C++</font><font face="宋体">来表示可以写成下面一段代码:</font></span></p> <p class="MsoNormal" style="background: rgb(255,255,255); text-align: left; margin: 5pt 0pt; mso-margin-top-alt: auto; mso-margin-bottom-alt: auto; mso-pagination: widow-orphan"><span style="font-size: 9pt; font-family: Arial; color: rgb(0,0,0); mso-spacerun: 'yes'; mso-font-kerning: 0.0000pt"><font face="宋体">请提交以下代码</font></span></p> <p class="MsoNormal" style="background: rgb(255,255,255); text-align: left; margin: 5pt 0pt; mso-margin-top-alt: auto; mso-margin-bottom-alt: auto; mso-pagination: widow-orphan"><span style="font-size: 9pt; font-family: Arial; color: rgb(0,0,0); mso-spacerun: 'yes'; mso-font-kerning: 0.0000pt"><font face="宋体"><img alt="" width="396" height="384" src="http://tk.hustoj.com/upload/201607/变量实验1.png" /></font></span></p>
Input格式
Output格式
Sample
Sample Input 1
no input needed
Sample Output 1
a=6 result=4
Submit Code
请先Login后Submit

🤖 AI 解题助手

OpenRouter
就绪
👋 你好!我是 AI 解题助手。
我已阅读了这problems题,可以帮你points析思路、提供Code示例。
🔓 完全Free · 无需消耗 Token