mirror of
https://github.com/TheAlgorithms/Java.git
synced 2025-12-19 07:00:35 +08:00
style: do not suppress lossy-conversions (#6206)
This commit is contained in:
@@ -63,7 +63,7 @@ public final class PerfectNumber {
|
||||
// if n is a perfect square then its root was added twice in above loop, so subtracting root
|
||||
// from sum
|
||||
if (root == (int) root) {
|
||||
sum -= root;
|
||||
sum -= (int) root;
|
||||
}
|
||||
|
||||
return sum == n;
|
||||
|
||||
Reference in New Issue
Block a user