Cod sursa(job #423465)

Utilizator andreea1coolBobu Andreea andreea1cool Data 23 martie 2010 21:51:14
Problema Tije Scor 100
Compilator cpp Status done
Runda Arhiva de probleme Marime 0.31 kb
#include<stdio.h>
int main()
{
	freopen("tije.in","r",stdin);
	freopen("tije.out","w",stdout);
	int n,i,j,t;
	scanf("%d",&n);
	for(i=n-1;i>=1;i--){
		for(j=n;j>=1;j--){
			for(t=1;t<=i;t++){
				printf("%d %d\n",j,j+1);
			}
		}
		for(t=1;t<=i;t++){
			printf("%d %d\n",n+1,1);
		}
	}
	return 0;
}