Cod sursa(job #3001092)
Utilizator | Data | 13 martie 2023 11:08:03 | |
---|---|---|---|
Problema | Tije | Scor | 5 |
Compilator | cpp-64 | Status | done |
Runda | Arhiva de probleme | Marime | 0.47 kb |
#include <fstream>
using namespace std;
ifstream cin("tije .in");
ofstream cout("tije.out");
int main()
{
int n , i , j , h;
cin >> n;
for(i = 1 ; i <= n ; i ++)
{
for (j = n ; j >= 1 ; j--)
{
for (h = 1 ; h <= i ; h++)
{
cout << j << " " << j+1 <<endl;
}
}
for(h = 1 ; h <= i ; h++)
{
cout << n + 1 << " " << "1" << endl;
}
}
return 0;
}