1
0
mirror of https://gitee.com/coder-xiaomo/leetcode-problemset synced 2025-01-10 18:48:13 +08:00
Code Issues Projects Releases Wiki Activity GitHub Gitee
leetcode-problemset/leetcode-cn/problem (Chinese)/加密运算 [bu-yong-jia-jian-cheng-chu-zuo-jia-fa-lcof].html

30 lines
898 B
HTML
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

<p>计算机安全专家正在开发一款高度安全的加密通信软件,需要在进行数据传输时对数据进行加密和解密操作。假定 <code>dataA</code><code>dataB</code> 分别为随机抽样的两次通信的数据量:</p>
<ul>
<li>正数为发送量</li>
<li>负数为接受量</li>
<li>0 为数据遗失</li>
</ul>
<p>请不使用四则运算符的情况下实现一个函数计算两次通信的数据量之和(三种情况均需被统计),以确保在数据传输过程中的高安全性和保密性。</p>
<p>&nbsp;</p>
<p><strong>示例 1</strong></p>
<pre>
<strong>输入:</strong>dataA = 5, dataB = -1
<strong>输出:</strong>4
</pre>
<p>&nbsp;</p>
<p><strong>提示:</strong></p>
<ul>
<li><code>dataA</code>&nbsp;<code>dataB</code>&nbsp;均可能是负数或 0</li>
<li>结果不会溢出 32 位整数</li>
</ul>
<p>&nbsp;</p>