Advertisement
O_Egor

59

May 18th, 2022
978
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. #include <iostream>
  2. #include <vector>
  3. #include <cmath>
  4. using namespace std;
  5.  
  6. int main()
  7. {  
  8.     int i = 0, start = 700000, pre(0);
  9.     while (i < 5)
  10.     {
  11.         int cnt(0);
  12.         for (int j = 2; j < start; ++j)
  13.         {
  14.             if (start % j == 0)
  15.             {
  16.                 cnt++;
  17.             }
  18.         }
  19.         if (cnt > pre)
  20.         {
  21.             cout << start << " " << cnt << '\n';
  22.             pre = cnt;
  23.             i++;
  24.         }
  25.         start++;
  26.     }
  27.     return 0;
  28. }
Advertisement
RAW Paste Data Copied
Advertisement