1
0
mirror of https://gitee.com/coder-xiaomo/leetcode-problemset synced 2025-12-14 06:32:36 +08:00
Code Issues Projects Releases Wiki Activity GitHub Gitee
This commit is contained in:
2022-03-29 12:43:11 +08:00
parent 58bbdfd57c
commit 2b0511d272
10721 changed files with 8123 additions and 8119 deletions

View File

@@ -0,0 +1,27 @@
<p>给定一个包含正整数、加(+)、减(-)、乘(*)、除(/)的算数表达式(括号除外),计算其结果。</p>
<p>表达式仅包含非负整数,<code>+</code> <code>-</code> <code>*</code><code>/</code> 四种运算符和空格&nbsp;<code>&nbsp;</code>。 整数除法仅保留整数部分。</p>
<p><strong>示例&nbsp;1:</strong></p>
<pre><strong>输入: </strong>&quot;3+2*2&quot;
<strong>输出:</strong> 7
</pre>
<p><strong>示例 2:</strong></p>
<pre><strong>输入:</strong> &quot; 3/2 &quot;
<strong>输出:</strong> 1</pre>
<p><strong>示例 3:</strong></p>
<pre><strong>输入:</strong> &quot; 3+5 / 2 &quot;
<strong>输出:</strong> 5
</pre>
<p><strong>说明:</strong></p>
<ul>
<li>你可以假设所给定的表达式都是有效的。</li>
<li><strong>不要</strong>使用内置的库函数 <code>eval</code></li>
</ul>