Advertisement
35657

Untitled

Nov 18th, 2023
462
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C++ 0.40 KB | None | 0 0
  1.  
  2. #include <iostream>
  3.  
  4. using namespace std;
  5.  
  6.  
  7.  
  8.  
  9. int main() {
  10.  
  11.     setlocale(LC_ALL, "ru");
  12.  
  13.     int total = 0;
  14.  
  15.     for (int i = 0; i < 10; i++) {
  16.         for (int j = 0; j < 10; j++) {
  17.             for (int k = 0; k < 10; k++) {
  18.                 if (i != j && i != k && j != k) {
  19.                     total += 3;
  20.                 }
  21.             }
  22.         }
  23.     }
  24.  
  25.     cout << "Время на открытие чемодана: " << total << " секунд" << endl;
  26. }
  27.  
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement