Add automatic linter (#4214)

This commit is contained in:
acbin
2023-06-09 20:05:14 +08:00
committed by GitHub
parent 00282efd8b
commit 415a04ea7f
188 changed files with 661 additions and 1133 deletions

View File

@@ -20,10 +20,7 @@ public class AliquotSum {
public static int getAliquotValue(int number) {
var sumWrapper = new Object() { int value = 0; };
IntStream.iterate(1, i -> ++i)
.limit(number / 2)
.filter(i -> number % i == 0)
.forEach(i -> sumWrapper.value += i);
IntStream.iterate(1, i -> ++i).limit(number / 2).filter(i -> number % i == 0).forEach(i -> sumWrapper.value += i);
return sumWrapper.value;
}