#include <iostream>
#include <cstdlib>
#include <cmath>
#include <cstring>
using namespace std;
int bitNum(int a) {
int i=0;
for(; a!=0; i++) a/=10;
return i;
}
int str2int(char str[80]) {
int m=0,k=strlen(str);
for(int i=0; i<k; i++) m+=(str[i]-48)*pow(10,k-i-1);
return m;
}
int main() {
int a[]= {642,101,1,116,21,12};
char str[80]= {};
int p=sizeof(a)/sizeof(int);
for(int i=0; i<p; i++) {
for(int j=i+1; j<p; j++) {
int n1=bitNum(a[i]);
int n2=bitNum(a[j]);
char str1[10]= {};
char str2[10]= {};
char buf1[n1];
char buf2[n2];