semeru/Code-Code-CloneDetection-POJ104 huggingface dataset:
main()
{
  int i=0,j=0,k,x=0,y;
  char a[101];
  char b[101];
  gets(a);
  k=strlen(a);
  for(i=0;i<k;i++)
  {
    if(a[i]!=' ')
    {
      b[j]=a[i];
      j++;
      x=0;         
    } 
    else
    {
     if(x==0)
     {
     b[j]=a[i];
     j++;
     x=1;
     }
      
    }    
  }
  b[j]='\0';
  int n=0;
  n=strlen(b);
  for(i=0;i<n;i++)
  printf("%c",b[i]);
  getchar();
  getchar();    
}
main ()
{	
	char a[101];
	gets(a);
	for (int i=0;i<strlen(a)-1;i++)
	{if (a[i]!=' '||a[i+1]!=' ')
	    printf ("%c",a[i]);
	}
	printf ("%c",a[strlen(a)-1]); 
}
int main()
{
	char input[200];
	char *a=input;
	int i;
	cin.getline(a,200,'\n');
	while(*a!='\0')
	{	
		if(*(a-1)==' '&&*a==' ')
			a++;
		else
		{
			cout<<*a;
			a++;
		}
	}
	return 0;
}
int main(){
	char sen[100];
	cin.getline(sen,100);
	for(int i=0;i<strlen(sen);){
		if(sen[i]==' '){
			cout<<' ';
			for(int j=i+1;sen[j]==' ';){
				if(sen[j]==' '){
					j++;
					i++;
				}
			}
			i++;
		}
		else {
			cout<<sen[i];
			i++;
		}
	 }
	return 0;
}
//***********************************
//* ????2.cpp                   *
//* ?? 1000012747                 *
//* ???????????          *
//***********************************
int main()
{
	char str[100]={' '};      //??????????????????
	int i,l;                  //??????i??????l
	cin.getline(str,100,'\n');
	l=strlen(str);
	for(i=0;i<l;i++)
	{
		if (str[i]!=' ')
			cout<<str[i];     //?????????????
		else if ((str[i+1]!=' ')&&(str[i-1]!=' '))    //?????????????????????
			cout<<str[i];
		else if ((str[i+1]==' ')&&(str[i-1]!=' '))    //?????????????????????????
			cout<<str[i];
	}
	return 0;
}
int main()
{
	char str[100];                 //???????100?????
	int n,i,a[100]={0};            //??????n,i ?????a[100]
	cin.get(str,100);              //?????
	n=strlen(str);                 //?????
	for(i=1;i<n;i++){
		if(str[i]==' '&&str[i-1]==' '){ 
			a[i]=1;                //???? ????????  ????????????1
		}}
	for(i=0;i<n;i++){
		if(a[i]==0)
			cout<<str[i];}        //???????0???
	return 0;                     //??0
}
int main()
{
    char s[100];
    char c[100];
    int i,k,w,j;
    
    gets(s);
    
    k=strlen(s);
    
    w=j=0;
    
    for(i=0;i<k;i++)
    {
        if(s[i]==' ')
        {
            if(s[i+1]==' ') 
            {
                w=1;
            }
            
            else
            {
              c[j]=s[i];
              j=j+1;
            }
            
        }
        else 
        {
            c[j]=s[i];
            j=j+1;
        }
        
     
    }
    
    c[j]=0;
    
    puts(c);
    
    return 0;
    
}
int main(){
    char a[100],b[50][20];
	int n,i,j=0,k=0;
	gets(a);
	n=strlen(a);
	for(i=0;i<n;i++){
		if(a[i]==32&&a[i-1]!=32){
		    b[j][k]='\0';
			k=0;
			j++;
		}else if(a[i]==32&&a[i-1]==32){
			continue;
		}else{
			b[j][k]=a[i];
			k++;
		}
	}
	b[j][k]='\0';
	for(i=0;i<=j;i++){
		if(i==0){
			printf("%s",b[i]);
		}else{
			printf(" %s",b[i]);
		}
	}
	return 0;
}
int main()
{
    int i,l,num[100]={0};      
    //????????i?????l????????num? ??????????
    char str[100];                                        //????
    gets(str);                                            //?????
    l=strlen(str);                                        //???????
    for(i=0;i<l;i++)                    //???????????num???1
    {
        if((str[i]<'A' || str[i]>'z' || (str[i]>'Z' && str[i]<'a')) && (str[i]!='.') && (str[i]!=','))
        num[i]=num[i]++;
    }
    for(i=0;i<l;i++)
    {
        if(num[i]==0) cout<<str[i];       //????????????????
        else if(num[i]==1 && num[i+1]==0) //???????????????
        cout<<str[i];
        else if(num[i]==1 && num[i+1]==1)
        continue;

    }
    return 0;
}
void main()
{ char s[100];
	int i,j,n;
	gets(s);
	for(i=0;i<strlen(s);i++){
		if(s[i]!=' ')
		printf("%c",s[i]);
		else{
	if(s[i-1]==' ')
		continue;
		else printf("%c",s[i]);}}
}
int main(){
    char s[100];
    int i,n;
    gets(s);
    n=strlen(s);
    for(i=0;i<n;i++){
                     if(!(s[i]==' ')){
                                printf("%c",s[i]);
                     }else if(!(s[i+1]==' ')){
                           printf(" ");
                     }
    }
    return 0;
}
int main()
{
  char a[100]={' '};
  int i,j,n=99;
  gets(a);
  for(i=99;i>=0;i--)
  {if(a[i]!='\0')
    {n=i;
    break;}
  }
  for(i=0;i<=n;i++)
 { if(a[i]==a[i+1]&&a[i]==' ')
      {for(j=i;j<n;j++)
        a[j]=a[j+1];
         i=i-1;
         n=n-1;
  }}
  for(i=0;i<=n;i++)
  printf("%c",a[i]);
 
}
int main ()
{
	char a[100],b[100];
	int i=0,n,j=0;
	gets(a);
	n=strlen(a);
	while (i<n){
		b[j]=a[i];
	    if(a[i]!=' '){
			j++;
		}
		else if(a[i]==' '){
			if(a[i+1]!=' '&&a[i-1]!=' '){
                b[j]=' ';
				j++;
			
			}
		     else if(a[i+1]!=' '&&a[i-1]==' '){
				b[j]=' ';
				j++;
				
			}
		}



		i++;
	}
	for(i=0;i<j;i++){
		printf("%c",b[i]);
	}
 
	return 0;
		
	
}
int main()
{
	char str[100];
	int i,len,count,p,t,flag,m,sum=0;
	gets(str);
	len=strlen(str);
	for(t=0;t<len;t++)
	{
		if(str[t]!='\0')
		{
			for(i=0;i<len;i++)
			{
				count=0;
				if(str[i]==' ')
				{
					flag=1;
					for(p=i;p<len;p++)
					{
						if(str[p]==' ')
						{
							flag*=1;
							count+=1;
						}
						else
						{
							flag*=0;
							break;
						}
					}
					if(count>1)
						for(m=0;m<len;m++)
							str[i+1+m]=str[i+count+m];
				}
				
				if(count>1)
				{
					sum+=count-1;
					break;
				}
			}
		}
	}
	for(i=0;i<len-sum;i++)
		printf("%c",str[i]);
	printf("\n");
	return 0;
}
int main()
{
char shuzu[101]={0};
gets(shuzu);
int i=0,j=0;
for(i=0;i<101;)
{
	if(*(shuzu+i)==' '&&*(shuzu+i+1)==' ')
		{
		for(j=i;j<101;j++)
			*(shuzu+j)=*(shuzu+j+1);
		}
	else i++;
}
cout<<shuzu<<endl;
return 0;
}
int main()
{
	char a[100];int i,n;
	cin.get(a,100);                //?????
	n=strlen(a);
	for(i=0;i<n;i++)
	if(a[i]==' '&&a[i+1]==' ')    //???????
		a[i]='0';            //????????????0
		                     //?????????????????0
         for(i=0;i<n;i++)     
		if(a[i]!='0')        //???0???
			cout<<a[i];
	return 0;
}
//*************************
//*???2013?11?15?   *
//*??????           *
//*????????       *
//*************************

int main()
{
	int i, begin;                                //??????i??????begin
	char a[1000];
	while(1)                                     //????
	{
		cin.getline(a,999);                       //?????
		if(a[0] == '\0')
			break;                               //??????????????
		
		for(i = 0; i <= 999; i++)
		{
			if(a[i] != ' ')
			{
				begin = i;
				break;                           //??????????????????????
			}
		}
		
		for(i = begin; i <= 999; i++)             //???????
		{
			//??????????????????
			if(a[i] != ' ' || (a[i] == ' ' && a[i+1] != ' ' && a[i+1] != '\0'))
			{
				cout << a[i];
			}
			if(a[i+1] == '\0')
				break;                           //?\0?????
		}

		cout << endl;
	}

	return 0;
}
int main()
{
    int j,i,a[1000]={0},l,count=0;
    char s[1000];
    gets(s);
    l=strlen(s);
    for(i=0;i<l;i++)
    {
                    if(s[i]!=' ')
                    a[i]=1;
   }
   i=0;
   while(i<l)
   {
    if(a[i]==0)
    count++;
    if(a[i]==1 && count !=0)
    {
       for(j=i+1-count;j<l+1-count;j++)
       {
                                       s[j]=s[j+count-1];
                                       a[j]=a[j+count-1];
       } 
       l=l-count+1;
         i=i-count+1;
         count=0;
    } 
       
    i++;
    }
    for(i=0;i<l;i++)
    printf("%c",s[i]);
    getchar();
    getchar();
}
/**
 *file:1000012776_5.cpp
 *author : ???1000012776
 *date : 12-12
 *discription : ??????????????
 */
int main ()
{
	char str[100] ;
	char *p , *q ;//?????????
	int flag = 0 ;//?????flag?0?
	cin.getline(str,100) ;
	for ( p = str ; ; p++ )//???????????
	{
		if ( *p == ' ' && flag == 1 )//??????????????????????????
		{
			for ( q = p ; ; q++ )//????????????????
			{
				*q = *(q+1) ;
				if ( *q == '\0' ) break ;
			}
			p-- ;//p???????
		}
		if ( *p == ' ' ) flag = 1 ;//???????????????
		else flag = 0 ;
		if ( *p == '\0' ) break ;
	}
	cout << str << endl ;
	return 0 ;
}
int main(int argc, char* argv[])
{
char a[100];
int n,i;
gets(a);
n=strlen(a);
if(a[0]!=' ')printf("%c",a[0]);
for(i=1;i<n;i++){
if(a[i]!=' ')printf("%c",a[i]);
else{if(a[i-1]!=' ')printf("%c",a[i]);}}



return 0;
}
int main()
{char a[101];
 char *p;
 cin.getline(a,101);
 p=a;
 while(*p!='\0')
 {if(*p!=' '||*p==' '&&*(p+1)!=' ')
  cout<<*p;
  p++;
 }
 return 0;
}
int main(void)
{
    char c;
    int k=-1;
    while(scanf("%c", &c)!=EOF)
    {
        if(!isspace(c))
            k=-1;
            else
            k++;
        if(isspace(c)&&k!=0)
            continue;
        printf("%c", c);
    }
    return 0;
}
//***************************
//*  ??????????   *
//*  ??????           *
//*  ???2010-11-18       *
//***************************
int main()
{
	int i,j,num;//??num???????????
	char str[100];
	cin.get(str,100);//????????????
	num=100;
	for(i=0;i<num;i++)
	{
		if(str[i]==' '&&str[i+1]==' ')//????????
		{
			for(j=i+1;j<num;j++)
			{
				str[j]=str[j+1];//??????????????????????
			}
			num--;//??????
			i--;//??????????????str[i]?str[i+1]??????
		}
	}
	cout<<str<<endl;
	return 0;
}
int main () {
	char c[101] ;
	cin.getline(c,101) ;
	int i , j , L , k ;
	L = (int)strlen(c) ;
	for ( i = 0 ; ; i ++ ) {
		if ( c[i] == '\0' )
			break ;
		if ( c[i] == ' ' ) {
			for ( j = i ; ; j ++ ) {
				if ( c[j] != ' ' ) {
					for ( k = j ; ; k ++ ) {
						if ( c[k] == '\0' ) {
							c[k-j+1+i] = c[k] ;
							break ;
						}
						c[k-j+i+1] = c[k] ;
					}
					break ;
				}
			}
		}
	}
	cout << c ;
}
int main()
{
	char a[100],b[100],i,j,n,m;
	gets(a);
	n=strlen(a);
	for(i=0;i<n;i++)
	{
		if(a[i]==' ')
		{
			for(j=i+1;j<n;j++)
			{
				if(a[j]!=' ')
				{
					break;
				}
				a[j]='>';
			}
		}
	}
	j=0;
	for(i=0;i<n;i++)
	{
		if(a[i]!='>')
		{
			b[j]=a[i];
			j++;
		}
	}
	m=strlen(b);
	for(i=0;i<j;i++)
	{
		printf("%c",b[i]);
	}
		




 
 
	return 0;
}
/*
 * guolvkongge.cpp
 *
 *  Created on: 2011-1-8
 *      Author: Owner
 */

int main()
{
	char a[200];
	int i,j,k;
	int x,y;
	cin.getline(a,102);
	x=strlen(a);
	for(i=0;i<x;i++)
	{
		if(a[i]==' ')
		{
			for(j=i+1;j<x;j++)
			{
				if(a[j]!=' ')
				{
				    y=j;
				    break;
				}
			}
			int s=i;
			if(y-s>=2)
			{
				for(k=y;k<=x;k++)
					a[k-y+s+1]=a[k];
			}
		}
	}
	for(i=0;i<=x;i++)
	{
		if(a[i]=='\0')
			break;
	}
	int v=i;
	for(i=0;i<v;i++)
		cout<<a[i];
	return 0;
}
int main(){
	int i,j=0,n;
	char a[101],b[101];
	gets(a);
	for(i=0;a[i];i++){
		if((a[i]!=' ')||((a[i]==' ')&&(a[i+1]!=' '))){
			b[i-j]=a[i];
		}else{
			j++;
		}
	}
	n=strlen(a);
	b[n-j]='\0';
	printf("%s",b);
	return 0;
}
/**
* @file		???????.cpp
* @author	??	1000012792
* @date		2010.12.8
*/
int main()
{
	char s[110];		
	char *p=&s[0];		//????*p????????????
	int flag =0;		//flag????????????????0
	cin.getline(s,110); //??????s[]
	while(*p!='\0')		//s[]????
	{
		if(*p==' '&&flag==0)	//????????????
		{
			cout << *p;			//??????flag??1
			flag = 1;
		}
		else
			if(*p!=' ')			//??????????????????flag????0
			{
				cout << *p;
				flag = 0;
			}
		p++;					//??????
	}
	return 0;
}
int main()
{
	char shuru[500];
	cin.getline(shuru,500);
	int i = 0, a = 0, j = 0;
	char *p = NULL;
	a = strlen(shuru);
	p = shuru;
	cout << shuru[0];
    for(i = 0; i <= a - 1; i++)
	{
		if(i >= 1)
		{
			if((shuru[i] == ' ' && shuru[i - 1] != ' ') || shuru[i] != ' ')
				cout << shuru[i];
		}
    }
	return 0;
}
int main(){
    char a[101];
    int i,j,n;
    gets(a);
    n=strlen(a);
    i=0;
    while(i<n){
        if(a[i]==' '&&a[i+1]==' '){
            for(j=i+1;j<n+1;j++){
                a[j-1]=a[j];
            }i=i;
        }else{
            i++;
        }
    }
    puts(a);
    return 0;
}
int main(){
	char z[101];
	gets(z);
	int len,a;
	a=len=strlen(z);
    for (int i=1;i<a;){
		if(z[i]==' '&&z[i-1]==' '){
			for(int y=i;y<len-1;y++){
			  z[y]=z[y+1];
			}
			len--;
		}else {i++;}
	}
	z[len]='\0';
	printf("%s",z);
	return 0;
}
void main()
{
    char *p,*p0;
    p0=p=(char *)malloc(100*sizeof(char));
    gets(p);
    for(p=p0;*p!='\0';p++)
    {
        if(*p!=' ')printf("%c",*p);
        else for(;*p!='\0';p++)
            if(*p!=' ')
            {
                p--;
                printf(" ");
                break;
            }
    }
}
int main(){
	int i,j;
	char sr[101],sc[101];
	gets(sr);

	for(i=0,j=0;sr[i]!='\0';i++){
		if(sr[i]==' '&&sr[i+1]==' '){
			continue;
		}else{
			sc[j]=sr[i];
			j++;
		}
	}
	sc[j]='\0';

	puts(sc);


	
	return 0;

}
/*???1000012904_1.cpp
  ??????????
  ?????
  ???2010?12?10?
 */
int main()
{
	//??????????????p1, ?????????????p2,????str1,???????str2
	char *p1, *p2, str1[101], str2[101];
	cin.getline(str1, 101);
	int flag = 0;//??????????0
	for(p1 = str1,p2 = str2; *p1!= '\0'; p1++,p2++)//???????????????????????????
	{
		*p2= *p1;//???????????????????
		if(*p1 ==' ')//??????
		{
			flag++;//????1
			if(flag > 1)
				p2--;//???????????????????????
		}
		else 
			flag = 0;//??????????????0
	}
	*p2 = '\0';//????'/0'??
	cout << str2 << endl;//?????????
	return 0;
}
int main()
{
	char a[100];
	int i, j, len, num = 0;
	gets(a);
	len = strlen(a);
	for (i = 0; i < len; i++)
	{
		while (a[i] == ' ')
		{
			num++;
			i++;
			if (a[i] != ' ')
			{
				for (j = i; j < len; j++)
				{
					a[j - num + 1] = a[j];
				}
				len = len - num + 1;
				a[len] = '\0';
				i = i - num + 1;
				num = 0;
			}
			
		}
	}
	for (i = 0; i < len; i++)
		cout << a[i];
	return 0;
}
//???????????
int main()
{
	char a[100];//??a[100]??????????
	gets(a);
	for(int i=0;i<strlen(a);i++)//???????????????????????????????????????????????
	   {if(a[i]!=' ')cout<<a[i];
	    if(a[i]==' '&&a[i+1]!=' ')cout<<a[i];
	}
	return 0;
}
int main(){
    char a[200],b[200];
    int i,j=0,p;
    gets(a);
    for(i=0;a[i]!='\0';i++){
    if(a[i]!=' '){
        b[j]=a[i];
        j=j+1;
        p=0;
     }
    if((a[i]==' ')&&p==0){
        b[j]=a[i];
        j=j+1;
        p=1;
    }
    }
    b[j]=0;
    printf("%s",b);
return 0;
}
int main()
{
	char a[100], *p;
	int i, count;
	cin.getline(a, 100);
	count = 0;
	for(p = a; *p != '\0'; p++)
	{
		if(p == a)
			continue;
		if(*p == ' ')
			count++;
		if(*p != ' ' && *(p - 1) == ' ')
		{
			count = count - 1;
			for(p = p - count, i = 0; ; i++)
			{
				p[i] = p[i + count];
				if(p[i] == '\0')
					break;
			}
			count = 0;
		}
	}
	cout << a << endl;
	return 0;
}
int main()
{
    char sen[101], sen2[101];
    int i = 0, j = 0, k = 0;
    while(1)
    {
        cin.get(sen[k]);
        if(sen[k] == '\n')
            break;
        k++;
    }
    for(i = 0; i < k; i++)
    {
        if(sen[i] != ' ' || (sen[i] == ' ' && sen[i - 1] != ' '))
            {
                sen2[j] = sen[i];
                j++;
            }
    }
    for(i = 0; i < j; i++)
        cout << sen2[i];
    return 0;
}
int main()
{
    char str[100];
    int i,l,s,m,j;
    gets(str);
    s=0;
    l=strlen(str);
    for(i=0;i<l-2;i++)
    for(s=0;s<l-i;s++)
    if(str[i]==' '&&str[i+1]==' ')
    for(j=i+1;j<l-s+1;j++)
    str[j]=str[j+1];
    printf("%s\n",str);
    getchar();
    getchar();
    getchar();
    getchar();
    getchar();
    getchar();
}
main()
{
      int i,n,l;
      char a[100],b[100];
      gets(a);
      l=strlen(a);
      for(i=0;i<l;i++)
      {
                     if(a[i]!=' ')
                       printf("%c",a[i]);
                      if(a[i]==' ')
                      {
                                 if(a[i-1]==' ')
                                 continue;
                                 else
                                printf(" ");
                      }
      }
      getchar();
}
int main()
{ 
  char *p,c[101];
  gets(c);
  p=c;
  while(*p!='\0')
  { 
    if(*p>32) cout<<*p;
    else
    { 
      cout<<' ';
      do{p++;}while(*p<33);
      cout<<*p;
    }
    p++;
  }   
  return 0;
}
int main()
{
	char a[101];
	cin.get(a, 101);
	for(int i = 0; i < strlen(a); i++)
	{
		if(a[i] != ' ')
			cout << a[i];
		if(a[i] == ' ' && a[i+1] != ' ')
		{
			cout << a[i] << a[i+1];
			i++;
		}
	}
	return 0;
}
int main()
{
	char str1[100],str2[100],c;
	int i=0,j=0,k=0;
	gets(str1);
	while((c=str1[i])!='\0')
		i++;
	do{
		str2[j++]=str1[k++];
		while((str1[k-1]==' ')&&(str1[k]==' '))
			k++;
	}
	while(k<i);
	for(i=0;i<j;i++)
		printf("%c",str2[i]);
	return 0;
}
main()
{    
     char s[100];
     gets(s);
     
     char ss[100];
      ss[0]=s[0];
     int i,k=1;
     for(i=1;s[i]!='\0';i++)
            if(s[i]!=' '||s[i]==' '&&s[i-1]!=' ')ss[k++]=s[i];
          ss[k]='\0'; 
     puts(ss);
     getchar(); 
}
int main(){
  char a[101];
  char b[101];
  int i,k=0,len;
  gets(a);
  len=strlen(a);
  for(i=0;i<len;i++){
    if(!(a[i]==' '&&a[i+1]==' '))
      {b[k]=a[i];k++;}
  }
  b[k]='\0';
  printf("%s",b);
  return 0;
}
main()
{
      char a[1000];
	gets(a);
	printf("%c",a[0]);
	for(int i=1;;i++)
	{
		if ( (a[i]!=' ' || a[i-1]!=' ' )&&a[i]!='\0')
			printf("%c",a[i]);
		if(a[i]=='\0')
			break;
	}
	return 0;}
int main()
{
	int i;
	char x[110]={0},y[100]={0};
	gets(x);
	int len=strlen(x);
	int k=0;
	for(i=1;i<len;i++)
	{
		if(x[i-1]!=' '&&x[i]!=' ')
			y[k++]=x[i];
		if(x[i-1]!=' '&&x[i]==' ')
			y[k++]=x[i];
		if(x[i-1]==' '&&x[i]!=' ')
			y[k++]=x[i];
	}
	printf("%c",x[0]);
	for(i=0;i<k;i++)
		printf("%c",y[i]);
	return 0;
}
int main()
{
	char a[100];									//???????????
	int len,i;										//????????????
	cin.getline(a,100);
	len=strlen(a);
	cout<<a[0];
	for(i=1;i<len;i++)
	{
		if(!(a[i]==' '&&a[i-1]==' '))				//?????????????????????
		cout.put(a[i]);
	}
	return 0;
}
int main()
{
	int l, i, j;
	 char a[1001];
	 gets(a);
	 l = strlen(a);
	 for (i = l - 1; i > 0; i--)
		 if (a[i]== ' ' && a[i - 1] == ' ')
		 {
			 l--;
			 for (j = i; j < l ; j++)
				 a[j] = a[j + 1];
		 }
	for (i = 0; i < l; i++)
		cout << a[i];
	return 0;
}
int main()
{
	char a[200],*p=a;
	int q=1;
	cin.getline(a,200);
	for(;*p!='\0';p++)
	{
		
		if(*p!=' ')
		{
			q=1;
		}
		if(q==1)
		{
			cout<<*p;
		}
			
		if(*p==' ')
		{
			q=0;
		}
		
	}
	return 0;
}
int main()
{
    char a[200];
    gets(a);
    int len=strlen(a);
    int i,j=0,flag=0;
    for(i=0;i<len;i++)
    {
        if(a[i]!=' ')
        {
            flag=0;
            printf("%c",a[i]);
        }
        else if(a[i]==' ')
        {
            if(flag==0)
            {
                flag=1;
                printf(" ");
            }
            else continue;
        }
       }


    printf("\n");
}
int main()
{
int i,j;
char str[101];
gets(str);
for(i=0;i<strlen(str);i++)
{
	if(str[i]==' ')
	{
		if(str[i+1]==' ')
		{
			for(j=i;j<=strlen(str);j++)
			{str[j]=str[j+1];
			}
			i--;
		}

	}
	
}
printf("%s",str);
}
int main(){
    int i,j,k;
    char a[100],b[100];
    j=0;
    gets(a);
    k=strlen(a);
    for(i=0;i<k;i++){
        if(a[i]!=' '){
            b[j]=a[i];
            j++;
        }
        else if(a[i]==' '&&a[i+1]==' '){
            j=j;
        }
        else if(a[i]==' '&&a[i+1]!=' '){
            b[j]=a[i];
            j++;
        }
    }
    b[j]=0;
    puts(b);
    return 0;
}
int main(){
	char g[100];
	char r[100];
	gets(g);
	int y=0;
	int d=strlen(g);
	for(int i=0;i<d;i++){
		if(g[i]!=32){
			r[y]=g[i];
			y++;
		}else if(g[i+1]!=32){
			r[y]=g[i];
			y++;
		}
	}
	for(int m=0;m<(y);m++){
		printf("%c",r[m]);
	}

			
	return 0;
}
int main( )
{ char a[105];
char *p=NULL;
 gets(a);
 for(p=a;*p!='\0';p++)
 { if(*p!=' ') cout<<*p;
 else
 { if(p[1]==' ') ;
 else cout<<*p;
 }
 }
 return 0;
}
main()
{
char a[200];

char b[200];
gets(a);
int i=0;
int n=0;
int m=0;
int t=0;
for(i=0;i<200;i++)
    b[i]='\0';

for(i=0;a[i]!='\0';i++)
{
if(a[i]==' ')
  n=n+1;
if(a[i]!=' ')
   n=0;
if(n>=2)
{
        
        //m=m+1; 
//printf("%d\n",m);

continue;
}
else
{b[t]=a[i];
t++;}
}
for(i=0;b[i]!='\0';i++)
   printf("%c",b[i]);
   
}
int main()
{
	char s[101],temp[101];
	gets(s);
	int i,j=0;
	
    for(i=0;i<strlen(s);i++)
	{
		if((s[i]!=' ')||(s[i-1]!=' '&&s[i]==' '))
		{
			
			temp[j]=s[i];
			j++;
		}
	}
	temp[j]='\0';
    puts(temp);
	return 0;
}
int main()
{
	char str1[100],str2[100];
	int i=0,k=0;
	for(i=0;i<100;i++)
	{
		str2[i]='\0';
	}
	cin.getline(str1,100);
	k=strlen(str1);
	cout<<str1[0];
	for(i=1;i<k;i++)
	{
		if((str1[i-1]!=' ')||(str1[i]!=' '))
			cout<<str1[i];
	}
	return 0;
}
int main()
{
	char a[100],b[100];
	char *p;
	int i,j=1;
	gets (a);
    p=a;
	b[0]=a[0];
	for(i=1;i<100;i++)
	{
		if(*(p+i)==' ')
		{
			if(*(p+i-1)!=' ')
			{
				b[j]=*(p+i);
				j++;
			}
		}
		else
		{
			b[j]=*(p+i);
			j++;
		}
	}
	cout << b << endl;
	return 0;
}
int main()
{
   int n;
    scanf("%d",&n);
    int i=1;
    while(i<=n)
    {
               
                double a,b,c;
   scanf("%lf %lf %lf",&a,&b,&c);
double x1,x2;
   if (b*b-4*a*c>0)
   {
   x1 = (-b + sqrt(b*b-4*a*c))/(2*a);
   x2 = (-b - sqrt(b*b-4*a*c))/(2*a);
   printf("x1=%.5f;x2=%.5f\n",x1,x2);
}
   if (b*b-4*a*c<0.00000001&&b*b-4*a*c>-0.00000001)
   {
   x1 = (-b + sqrt(b*b-4*a*c))/(2*a);
   printf("x1=x2=%.5f\n",x1);
}
    if(b*b-4*a*c<-0.00000001)
    {
   double n,m;
   n=-b/(2*a);
   m=sqrt(4*a*c-b*b)/(2*a);
   if(fabs(n)<0.00001)
   n=0.00000;
      printf("x1=%.5f+%.5fi;x2=%.5f-%.5fi\n",n,m,n,m);
}
   i=i+1;}

   }
int main(int argc, char* argv[])
{
	int n, j;
	double x1, x2, s, t, a, b, c;
	scanf("%d", &n);
	for(j=1;j<=n;j++)
	{
		scanf("%lf%lf%lf", &a, &b, &c);
	    if(b*b-4*a*c>0)
		{
           x1 = (-b + sqrt(b*b-4*a*c))/(2*a); 
           x2 = (-b - sqrt(b*b-4*a*c))/(2*a);
		   printf("x1=%.5lf;x2=%.5lf\n", x1, x2);
		}
		if(b*b-4*a*c==0)
		{
			x1=-b/(2*a);
			printf("x1=x2=%.5lf\n",x1);
		}
		if(b*b-4*a*c<0)
		{
			s=-b/(2*a);
			t=sqrt(4*a*c-b*b)/(2*a);
						    printf("x1=%.5lf+%.5lfi;x2=%.5lf-%.5lfi\n", s, t, s, t);
			
		}
	}


	return 0;
}
double fangcheng(double a,double b,double c)
{
	double d,x1,x2,m,n;
	d=b*b-4*a*c;
	if(d>0)
	{
		x1=(-b+sqrt(d))/(2*a);
		x2=(-b-sqrt(d))/(2*a);
		printf("x1=%.5lf;x2=%.5lf\n",x1,x2);
	}
	else if (d==0)
	{
		x1=-b/(2*a);
		x2=-b/(2*a);
		printf("x1=x2=%.5lf\n",x1);
	}
	else if (d<0)
	{
		m=-b/(2*a);
		n=sqrt(-d)/(2*a);
		if(m==-0)
		{
			m=0;
		}
		printf("x1=%.5lf+%.5lfi;x2=%.5lf-%.5lfi\n",m,n,m,n);
	}
	return 0;
}
int main()
{
	int n;
	scanf("%d",&n);
	while(n>0) 
	{
     double a,b,c;
	  scanf("%lf%lf%lf",&a,&b,&c);
      n=n-1;
	  fangcheng (a,b,c);
	}
	return 0;
}
//********************************
//*???6.cpp   **
//*????????????**
//*????? 1300012844 **
//*???2013.10.9  **
//********************************

int main()
{
 	int n; //????????n
	double x1, x2; //?????x1?x2
	double a, b, c, delta; //???????a?b?c????delta 
	
	cin >> n; //??n 
	
	for ( int i = 0; i < n; i++)
	{
	 	cin >> a >> b >> c; //????a?b?c
		
		delta = b * b - 4 * a * c; //?????delta
		
		if ( delta > 0 ) //??delta?????????? 
		   {   	 	   //??????x1,x2????0??-0????? 
 	   	   	 x1 = 0 + ( -b + sqrt(delta) ) / ( 2 * a ); 
			 x2 = 0 + ( -b - sqrt(delta) ) / ( 2 * a ); 
 	   	   	 cout <<fixed << setprecision(5);
 	   	   	 cout << "x1=" << x1 << ";x2=" << x2 << endl; //??x1?x2 
	   	   } 
	    else if ( delta < 0 ) //??delta?????????? 
	 		 {
			  	x1 = 0 + ( - b ) / (2 * a); //x1???? 
				x2 = fabs( sqrt(-delta) / (2 * a) ); //x2????
				cout << fixed << setprecision(5);
				cout << "x1=" << x1 << "+" << x2 << "i;";
				cout << "x2=" << x1 << "-" << x2 << "i" << endl;  //??x1?x2  		 
		  	 } 
	    else
			{
			   	x1 =  0 + ( - b ) / (2 * a); //?????????
				cout << fixed << setprecision(5);
				cout << "x1=x2=" << x1 << endl; //??x1?x2  			
	  		} 
	
	} 
	
	return 0;
}
/*
 * 004.cpp
 *
 *  Created on: 2012-9-28
 *  Author: ???
 *  ??:???????????????
 */

int main(){
	int n;
	double a,b,c,delta,x1,x2,x;
	cin >> n;
	while(n--){
		cin >> a >> b >> c;
		delta=b*b-4*a*c;
		if (delta>=0){                                      //??????
			if (delta>0){
				x1=(-b + sqrt(delta))/(2*a);
				x2=(-b - sqrt(delta))/(2*a);
				if (x1==0) x1=0;                //????"-0"???
				if (x2==0) x2=0;
				printf("x1=%.5f;x2=%.5f\n",x1,x2);  //?printf??????5???
			} else {
				x1=(-b)/(2*a);
				if (x1==0) x1=0;
				printf("x1=x2=%.5f\n", x1);
			}
	    }else {
	    	x1=(-b)/(2*a);              //??
	    	x=sqrt(-delta)/(2*a);       //??
	    	if (x1==0) x1=0;
                  if (x==0) x=0;
	    	printf("x1=%.5f+%.5fi;x2=%.5f-%.5fi\n",x1,x,x1,x);
	    }
	}
	return 0;
}