fork download
  1. #include <iostream>
  2.  
  3. int main() {
  4.  
  5. std::size_t L = 5;
  6. for (std::size_t z = 1; z < L; z++) {
  7. for (std::size_t y = 1; y < L; y++) {
  8. for (std::size_t x = 1; x < L; x++) {
  9. if ((1 / static_cast<double>(x)) +
  10. (1 / 2.0 * static_cast<double>(y)) +
  11. (1 / 3.0 * static_cast<double>(z)) == (4 / 3.0)) {
  12. std::cout<<'['<<x<<','<<y<<','<<z<<']'<<std::endl;
  13. }
  14. }
  15. }
  16. }
  17. return true;
  18.  
  19. }
Runtime error #stdin #stdout 0s 15232KB
stdin
Standard input is empty
stdout
[2,1,1]