Advertisement
spacerose

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

Jan 14th, 2021
738
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C++ 0.31 KB | None | 0 0
  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.  
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement