#include <stdio.h>
long long gcd(long long  a,long long  b) {
    if(a<b) {
        long long  tmp=a;
        a=b;
        b=tmp;
    }
    long long r=a%b;
    while(r>0) {
        a=b;
        b=r;
        r=a%b;
    }
    return b;
}
int main() {
    long long  a,b;
    scanf("%lld %lld",&a, &b);
    long long len=gcd(a,b);
    for(long long i=0; i<len; i++) {
        printf("1");
    }
    return 0;
}


Embed on website

To embed this project on your website, copy the following code and paste it into your website's HTML: