Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include <iostream>
- using namespace std;
- int main() {
- int one, two, three, four, five, six, sum, oneZ, twoZ, threeZ, fourZ, fiveZ, sixZ;
- sum = 0;
- for (int i = 100000; i <= 999999; i++){
- one = i / 100000; //П
- two = i / 10000 % 10; //P
- three = i % 10000 / 1000; //N
- four = i % 1000 / 100; //M
- five = i % 100 / 10; //E
- six = i % 10; //P
- /*
- if (two == six) {
- if (one != three != four != five != five) {
- sum = i + (i - (one * 100000)) + ((three * 1000) + (four * 100) + (five * 10) + six) +
- ((four * 100) + (five * 10) + six) + ((five * 10) + six) + six;
- oneZ = sum / 100000;
- twoZ = sum / 10000 % 10;
- threeZ = sum % 10000 / 1000;
- fourZ = sum % 1000 / 100;
- five = sum % 100 / 10;
- sixZ = sum % 10;
- if (twoZ == fourZ == sixZ) {
- if (oneZ != threeZ != fiveZ) {
- cout << one << " " << two << " " << three << " " << four << " " << five << " " << six;
- cout << endl;
- cout << sum;
- cout << endl;
- cout << twoZ << " " << fourZ << " " << sixZ;
- }
- }
- }
- }
- */
- return 0;
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement