/*
#include <stdio.h>
#include <stdlib.h>
int main()
{
printf("Hello world!\n");
return 0;
}
*/
/*
#include <stdio.h>
#include <string.h>
int main()
{
char str[101]={};
int i;
gets(str);
for(i=0;str[i]!=NULL;i++)
{
if(str[i]!=' ')
{
printf("%c",str[i]);
}
}
return 0;
}
*/
/*
#include <stdio.h>
#include <string.h>
int main()
{
char str[100001]={};
int i,e=0,j=0;
scanf("%s",str);
for(i=0;str[i]!=NULL;i++)
{
if(str[i]=='(')
{
e = e + 1;
}
else if(str[i]==')')
{
j=j+1;
}
}
printf("%d %d",e,j);
}
*/
/*
#include <stdio.h>
#include <string.h>
int main()
{
char str[11]={};
int i;
scanf("%s",str);
for(i=0;str[i]!=NULL;i++)
{
if(str[i]=='t')
{
printf("%d ",i+1);
}
}
}
*/
/*
#include <stdio.h>
#include <string.h>
int main()
{
char str[101]={};
int e=0,i,j=0,a;
scanf("%s",str);
for(i=0;str[i]!=NULL;i++)
{
if(str[i]=='c'||str[i]=='C')
{
e =e +1;
if(str[i+1]=='c'||str[i+1]=='C')
{
j=j+1;
}
}
}
printf("%d\n%d",e,j);
return 0;
}
*/
/*
#include <stdio.h>
#include <string.h>
int main()
{
char str[101]={};
int i,e=0;
gets(str);
for(i=0;str[i]!=NULL;i++)
{
if(str[i]==108&&str[i+1]=='o'&&str[i+2]=='v'&&str[i+3]=='e')
{
e = e+1;
}
}
printf("%d",e);
return 0;
}
#include <stdio.h>
#include <string.h>
int main()
{
char str[51]={};
int i,e=10;
scanf("%s",str);
for(i=1;str[i]!='\0';i++)
{
if(str[i]!=str[i-1])
{
e =e +10;
}
else
{
e = e+5;
}
}
printf("%d",e);
}
아스키코드 ascii code
'a' 97
'A' 65
'0' 48
'1' 49
...
'9'
'\0' 0 NULL
'()' (x)
#include <stdio.h>
#include <string.h>
int main()
{
// char str[51]={};
// int i,c=0;
// scanf("%s",str);
// c=strlen(str);
// //if(str=="love") (x) if(strcmp(str,"love")==0) (o)
//
// for(i=0;i<c;i++)
// {
// }
// printf("%c",'Y'+32);
printf("%d",'8'-'0');
}
*/
/*
#include <stdio.h>
#include <string.h>
int main()
{
char str[501]={};
int a,i,e=0;
scanf("%s",str);
for(i=0;str[i]!=NULL;i++)
{
e = e+ (str[i]-48);
}
printf("%d",e%3==0);
return 0;
}
*/
/*
#include <stdio.h>
#include <string.h>
int main()
{
char str[21]={};
int a=0,i,e=0;
scanf("%s",str);
for(i=0;str[i]!=NULL;i++)
{
printf("%c",str[i]+2);
}
printf("\n");
for(i=0;str[i]!=NULL;i++)
{
printf("%c",(str[i])*7%80+48);
}
}
*/
#include <stdio.h>
#include <string.h>
int main()
{
char str[101]={},str1[101]={};
int a=0,i,e=0;
scanf("%s %s",str,str1);
for(i=0;str[i]!=NULL;i++)
{
e = e+(str[i]-48);
}
for(i=0;str1[i]!=NULL;i++)
{
a = e+(str1[i]-48);
}
if(a<e)
{
printf("%s %s",str,str1);
}
else if(a<e)
{
printf("%s %s",str1,str);
}
}