Created
January 10, 2024 13:15
-
-
Save BigRedEye/16440a2de551d9ae9bf23514a6a6d06b to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#include <cstdint> | |
#include <cstdio> | |
bool check() { | |
uint32_t a = 1; | |
uint32_t b = 1; | |
uint32_t c = 1; | |
while (true) { | |
while (true) { | |
while (true) { | |
if (a * a * a + b * b * b == c * c * c) { | |
// printf("%u^3 + %u^3 == %u^3\n", a, b, c); | |
return true; | |
} | |
a++; | |
if (a > 1000) { | |
a = 1; | |
} | |
} | |
b++; | |
if (b > 1000) { | |
b = 1; | |
} | |
} | |
c++; | |
if (c > 1000) { | |
c = 1; | |
} | |
} | |
return false; | |
} | |
int main() { | |
if (check()) { | |
printf("Found\n"); | |
} else { | |
printf("Not found\n"); | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment