fork(1) download
  1. #include <iostream>
  2. #include <cstdint>
  3. #include <vector>
  4.  
  5. //compiled by vc++ 2019.
  6.  
  7. int main() {
  8. std::size_t L = 21702;
  9. for (std::uint_fast64_t a = 1; a < L; a++) {
  10. for (std::uint_fast64_t b = 1; b < L; b++) {
  11. for (std::uint_fast64_t c = 1; c < L; c++) {
  12. for (std::uint_fast64_t d = 1; d < L; d++) {
  13. for (std::uint_fast64_t e = 1; e < L; e++) {
  14. for (std::uint_fast64_t f = 1; f < L; f++) {
  15. for (std::uint_fast64_t g = 1; g < L; g++) {
  16. for (std::uint_fast64_t h = 1; h < L; h++) {
  17. for (std::uint_fast64_t i = 1; i < L; i++) {
  18. for (std::uint_fast64_t j = 1; j < L; j++) {
  19. std::uintmax_t AB = (a * a * a - b * b * b);
  20. if ((AB == (c * c * c - d * d * d)) && (AB == (e * e * e - f * f * f)) && (AB == (g * g * g - h * h * h)) && (AB == (i * i * i - j * j * j))) {
  21.  
  22.  
  23. std::uint64_t A[] = { a,b,c,d,e,f,g,h,i,j };
  24. bool F = false;
  25.  
  26. for (std::uint_fast64_t x = 0; x < std::size(A); x++) {
  27. for (std::uint_fast64_t y = x + 1; y < std::size(A); y++) {
  28. if (A[x] == A[y]) {
  29. F = true;
  30. break;
  31. }
  32.  
  33. }
  34. if (F) { break; }
  35. }
  36.  
  37. if (!F) {
  38. std::cout << a * a * a - b * b * b << ':' << '[' << a << ']' << '[' << b << ']' << '[' << c << ']' << '[' << d << ']' << '[' << e << ']' << '[' << f << ']' << '[' << g << ']' << '[' << h << ']' << '[' << i << ']' << '[' << j << ']' << std::endl;
  39. }
  40. }
  41. }
  42. }
  43. }
  44. }
  45. }
  46. }
  47. }
  48. }
  49. }
  50. }
  51.  
  52. return 0;
  53.  
  54. }
Compilation error #stdin compilation error #stdout 0s 0KB
stdin
Standard input is empty
compilation info
prog.cpp: In function ‘int main()’:
prog.cpp:26:48: error: ‘size’ is not a member of ‘std’
             for (std::uint_fast64_t x = 0; x < std::size(A); x++) {
                                                ^~~
prog.cpp:27:53: error: ‘size’ is not a member of ‘std’
              for (std::uint_fast64_t y = x + 1; y < std::size(A); y++) {
                                                     ^~~
stdout
Standard output is empty