Data commit
This commit is contained in:
parent
7387c8f97b
commit
cb5bb5e222
199093 changed files with 3378972 additions and 0 deletions
21
Task/Anti-primes/Processing/anti-primes.processing
Normal file
21
Task/Anti-primes/Processing/anti-primes.processing
Normal file
|
|
@ -0,0 +1,21 @@
|
|||
void setup() {
|
||||
int most_factors = 0;
|
||||
IntList anti_primes = new IntList();
|
||||
int n = 1;
|
||||
while (anti_primes.size() < 20) {
|
||||
int counter = 1;
|
||||
for (int i = 1; i <= n / 2; i++) {
|
||||
if (n % i == 0) {
|
||||
counter++;
|
||||
}
|
||||
}
|
||||
if (counter > most_factors) {
|
||||
anti_primes.append(n);
|
||||
most_factors = counter;
|
||||
}
|
||||
n++;
|
||||
}
|
||||
for (int num : anti_primes) {
|
||||
print(num + " ");
|
||||
}
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue