mirror of
				https://gitee.com/coder-xiaomo/leetcode-problemset
				synced 2025-11-04 03:33:12 +08:00 
			
		
		
		
	
		
			
				
	
	
		
			27 lines
		
	
	
		
			604 B
		
	
	
	
		
			HTML
		
	
	
	
	
	
			
		
		
	
	
			27 lines
		
	
	
		
			604 B
		
	
	
	
		
			HTML
		
	
	
	
	
	
<p>给定一个非负整数 <code>c</code> ,你要判断是否存在两个整数 <code>a</code> 和 <code>b</code>,使得 <code>a<sup>2</sup> + b<sup>2</sup> = c</code> 。</p>
 | 
						||
 | 
						||
<p> </p>
 | 
						||
 | 
						||
<p><strong>示例 1:</strong></p>
 | 
						||
 | 
						||
<pre>
 | 
						||
<strong>输入:</strong>c = 5
 | 
						||
<strong>输出:</strong>true
 | 
						||
<strong>解释:</strong>1 * 1 + 2 * 2 = 5
 | 
						||
</pre>
 | 
						||
 | 
						||
<p><strong>示例 2:</strong></p>
 | 
						||
 | 
						||
<pre>
 | 
						||
<strong>输入:</strong>c = 3
 | 
						||
<strong>输出:</strong>false
 | 
						||
</pre>
 | 
						||
 | 
						||
<p> </p>
 | 
						||
 | 
						||
<p><strong>提示:</strong></p>
 | 
						||
 | 
						||
<ul>
 | 
						||
	<li><code>0 <= c <= 2<sup>31</sup> - 1</code></li>
 | 
						||
</ul>
 |