← 返回 google 的题目列表Find Numbers Expressed as Sum of Two Squares
类型:online_judge
Given an integer n, find all integers s < n such that s can be expressed as the sum of two squares in exactly two distinct unordered ways, where a and b are non-negative integers and (a, b) and (b, a) are considered the same representation. Example: 50 = 1² + 7² = 5² + 5². Find all numbers less than n that satisfy this condition, 1 <= n < 2³¹ - 1.
Example
Input
100