fork download
  1. #include <iostream>
  2. using namespace std;
  3.  
  4. int main() {
  5. int n = 0,max;
  6. for(int i = 3361; i < 9206; i++){
  7. if(((i % 5 == 0) or (i % 4 == 0)) and (i % 9 != 0) and (i % 11 != 0) and (i % 17 != 0) and (i% 23 != 0)){
  8. n++;
  9. max = i;
  10. }
  11. }
  12. cout <<n <<" " <<max;
  13. return 0;
  14. }
Success #stdin #stdout 0s 4384KB
stdin
Standard input is empty
stdout
1701 9205