2 solutions

  • 1
    @ 2025-12-13 17:38:36
    #include<bits/stdc++.h>
    using namespace std;
    int main()
    {
        for(int i=1;i<=3;i++)
            for(int ii=1;ii<=3;ii++)
                for(int iii=1;iii<=3;iii++)
                    if(i!=ii&&ii!=iii&&i!=iii)
                        cout<<i<<ii<<iii<<endl;
    }
    
    • 1
      @ 2025-12-13 16:57:09
      #include<bits/stdc++.h>
      using namespace std;
      int main()
      {
          /*for(int i=1;i<=3;i++)
              for(int ii=1;ii<=3;ii++)
                  for(int iii=1;iii<=3;iii++)
                      if(i!=ii&&ii!=iii&&i!=iii)
                          cout<<i<<ii<<iii<<endl;*/
          cout<<"123\n132\n213\n231\n312\n321\n";
      }
      
      • 1

      Information

      ID
      1776
      Time
      1000ms
      Memory
      256MiB
      Difficulty
      10
      Tags
      # Submissions
      4
      Accepted
      2
      Uploaded By