Skip to main content
-1 byte: `for` loop initialization
Source Link
Jakob
  • 2.8k
  • 1
  • 13
  • 24

Java 8, 106105 bytes

A void lambda accepting a mutable java.util.Set<String>.

s->{for(int i=0,a,b;while(i<49b;i<49;)if(s.add(""+(a=i/7)+(b=i++%7))&(s.add(""+b+a)|a==b))System.out.print(" "+a+b);}

Try It OnlineTry It Online

Ungolfed

s -> {
    for (int i = 0, a, b;
    while (i < 4949;)
        if (
            s.add("" + (a = i / 7) + (b = i++ % 7))
            & (
                s.add("" + b + a)
                | a == b
            )
        )
            System.out.print(" " + a + b);
}

Acknowledgments

  • -1 byte thanks to Jonathan Frech

Java 8, 106 bytes

A void lambda accepting a mutable java.util.Set<String>.

s->{int i=0,a,b;while(i<49)if(s.add(""+(a=i/7)+(b=i++%7))&(s.add(""+b+a)|a==b))System.out.print(" "+a+b);}

Try It Online

Ungolfed

s -> {
    int i = 0, a, b;
    while (i < 49)
        if (
            s.add("" + (a = i / 7) + (b = i++ % 7))
            & (
                s.add("" + b + a)
                | a == b
            )
        )
            System.out.print(" " + a + b);
}

Java 8, 105 bytes

A void lambda accepting a mutable java.util.Set<String>.

s->{for(int i=0,a,b;i<49;)if(s.add(""+(a=i/7)+(b=i++%7))&(s.add(""+b+a)|a==b))System.out.print(" "+a+b);}

Try It Online

Ungolfed

s -> {
    for (int i = 0, a, b; i < 49;)
        if (
            s.add("" + (a = i / 7) + (b = i++ % 7))
            & (
                s.add("" + b + a)
                | a == b
            )
        )
            System.out.print(" " + a + b);
}

Acknowledgments

  • -1 byte thanks to Jonathan Frech
Source Link
Jakob
  • 2.8k
  • 1
  • 13
  • 24

Java 8, 106 bytes

A void lambda accepting a mutable java.util.Set<String>.

s->{int i=0,a,b;while(i<49)if(s.add(""+(a=i/7)+(b=i++%7))&(s.add(""+b+a)|a==b))System.out.print(" "+a+b);}

Try It Online

Ungolfed

s -> {
    int i = 0, a, b;
    while (i < 49)
        if (
            s.add("" + (a = i / 7) + (b = i++ % 7))
            & (
                s.add("" + b + a)
                | a == b
            )
        )
            System.out.print(" " + a + b);
}