35657

Untitled

Feb 9th, 2024
1,108
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C++ 0.45 KB | None | 0 0
  1. #include <iostream>
  2.  
  3. using namespace std;
  4.  
  5. int main() {
  6.  
  7.     setlocale(LC_ALL, "ru");
  8.  
  9.     int total = 0;
  10.  
  11.     for (int a = 0; a < 10; a++) {
  12.         for (int b = 0; b < 10; b++) {
  13.             for (int c = 0; c < 10; c++) {
  14.                 if (a != b && a != c && b != c) {
  15.                     cout << a << b << c << endl;
  16.                     total += 3;
  17.                 }
  18.             }
  19.         }
  20.     }
  21.  
  22.     cout << "Время на перебор уникальных комбинаций - " << total << " секунд" << endl;
  23.  
  24. }
Advertisement
Add Comment
Please, Sign In to add comment