Sum of Square Numbers 2019-05-25 22:59:14 浏览数 (1) 1. Description2. Solution代码语言:javascript复制class Solution { public: bool judgeSquareSum(int c) { int root = int(sqrt(c)) 1; for(int i = 0; i < root; i ) { int difference = c - i * i; int j = int(sqrt(difference)); if(i * i j * j == c) { return true; } } return false; } }; numbers sum 0 人点赞 上一篇:分享雷军22年前编写的代码