Cod sursa(job #666892)

Utilizator indestructiblecont de teste indestructible Data 22 ianuarie 2012 13:48:58
Problema Triplete Scor 0
Compilator cpp Status done
Runda Arhiva de probleme Marime 0.25 kb
#include <stdio.h>
#include <math.h>
int s,n;
int main()
{
	freopen("triplete.in","r",stdin);
	freopen("triplete.out","w",stdout);
	scanf("%d",&s);
	int i;
	for (i=1; i<=3; i++)
	{
		n=(int)sqrt(s);
		printf("%d ",n);
		s-=n*n;
	}
	return 0;
}