Advertisement
HeroBaga

Untitled

Nov 27th, 2018
361
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C++ 1.53 KB | None | 0 0
  1.     #include <iostream>
  2.     using namespace std;
  3.  
  4. int main() {
  5.     int one, two, three, four, five, six, sum, oneZ, twoZ, threeZ, fourZ, fiveZ, sixZ;
  6.     sum = 0;
  7.     for (int i = 100000; i <= 999999; i++){
  8.         one = i / 100000;                       //П
  9.         two = i / 10000 % 10;                   //P
  10.         three = i % 10000 / 1000;               //N
  11.         four = i % 1000 / 100;                  //M
  12.         five = i % 100 / 10;                    //E
  13.         six = i % 10;                           //P
  14.  
  15.         /*
  16.         if (two == six) {
  17.             if (one != three != four != five != five) {
  18.                 sum = i + (i - (one * 100000)) + ((three * 1000) + (four * 100) + (five * 10) + six) +
  19.                       ((four * 100) + (five * 10) + six) + ((five * 10) + six) + six;
  20.                 oneZ = sum / 100000;
  21.                 twoZ = sum / 10000 % 10;
  22.                 threeZ = sum % 10000 / 1000;
  23.                 fourZ = sum % 1000 / 100;
  24.                 five = sum % 100 / 10;
  25.                 sixZ = sum % 10;
  26.                 if (twoZ == fourZ == sixZ) {
  27.                     if (oneZ != threeZ != fiveZ) {
  28.                         cout << one << " " << two << " " << three << " " << four << " " << five << " " << six;
  29.                         cout << endl;
  30.                         cout << sum;
  31.                         cout << endl;
  32.                         cout << twoZ << " " << fourZ << " " << sixZ;
  33.                     }
  34.                 }
  35.             }
  36.         }
  37.          */
  38.     return 0;
  39.     }
  40. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement