Created an additional printing method.
Stergios Upload Compile Checker / Explore-Gitea-Actions (push) Successful in 3s

This commit is contained in:
metallaxis committed 2026-07-05 05:59:57 +03:00
1 parent 49467332de
commit fa7aa240e1
4 files changed
+27 -9

No files matched your search

+4 -3
View File
@@ -120,6 +120,7 @@ int main() {
while (print_mode == 0) {
if (printf("1: Print full?\n") < 0) return 1;
if (printf("2: Print minimal?\n") < 0) return 1;
if (printf("3: Print debug?\n") < 0) return 1;
char* line = prompt_line("Choose what mode you want to enter: ");
if (!line) {
fprintf(stderr, "Input error.\n");
@@ -127,7 +128,7 @@ int main() {
}
print_mode = atoi(line);
free(line);
if (print_mode != 1 && print_mode != 2) print_mode = 0;
if (print_mode != 1 && print_mode != 2 && print_mode != 3) print_mode = 0;
}
if (mode == 1) {
@@ -149,7 +150,7 @@ int main() {
int128_t greater = max2(b, c);
LIMIT = a >= greater ? a * greater : b * c;
solve(&sum, a, b, c, print_mode, f_output);
solve(&sum, gcd, a, b, c, print_mode, f_output);
} else if (mode == 2) {
clear_global_table(); /* Reset unique root tracker */
int32_t p = 7;
@@ -173,7 +174,7 @@ int main() {
if (is_new_root(ra, rb, rc)) {
int128_t greater = max2(rb, rc);
LIMIT = ra >= greater ? ra * greater / 2 : rb * rc / 2;
solve(&sum, ra, rb, rc, print_mode, f_output);
solve(&sum, gcd, ra, rb, rc, print_mode, f_output);
}
}