spacerose

17задание егэ2021

Jan 14th, 2021
574
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1.  
  2. #include <iostream>
  3.  
  4. using namespace std;
  5.  
  6. int main()
  7.  
  8. {
  9.     int count=0, max=0;
  10.     for (int i=2481; i<14832; i++) {
  11.         if ((i%5 == 0 || i%11 ==0) && (i%6 !=0 && i%7 !=0 && i%10 !=0 && i%23 !=0)) {
  12.         count++;
  13.         if (i>max) max=i;
  14.         }
  15.     }
  16.     cout<< count<<endl<<max;
  17. }
  18.  
  19.  
RAW Paste Data