Skip to main content
added 144 characters in body
Source Link
Yodle
  • 2.4k
  • 13
  • 23

Java, 92 8989 71 bytes

Now with lambdas!

(t,l,u)->{int z=0;for(;l<=u;)if((l+++"").contains(t+""))z++;return z;};

Old 89 byte function solution:

int d(int t,int l,int u){int a=0,i=l;for(;i<=u;)if((i+++"").contains(t+""))a++;return a;}

Hooray for the super increment function!

Java, 92 89 bytes

int d(int t,int l,int u){int a=0,i=l;for(;i<=u;)if((i+++"").contains(t+""))a++;return a;}

Hooray for the super increment function!

Java, 92 89 71 bytes

Now with lambdas!

(t,l,u)->{int z=0;for(;l<=u;)if((l+++"").contains(t+""))z++;return z;};

Old 89 byte function solution:

int d(int t,int l,int u){int a=0,i=l;for(;i<=u;)if((i+++"").contains(t+""))a++;return a;}

Hooray for the super increment function!

added 7 characters in body
Source Link
Yodle
  • 2.4k
  • 13
  • 23

Java, 9292 89 bytes

int d(int t,int l,int u){int a=0;fora=0,i=l;for(int i=l;i<=u;;i<=u;)if((i+++"").contains(t+""))a++;return a;}

Hooray for the super increment function!

Java, 92 bytes

int d(int t,int l,int u){int a=0;for(int i=l;i<=u;)if((i+++"").contains(t+""))a++;return a;}

Hooray for the super increment function!

Java, 92 89 bytes

int d(int t,int l,int u){int a=0,i=l;for(;i<=u;)if((i+++"").contains(t+""))a++;return a;}

Hooray for the super increment function!

Source Link
Yodle
  • 2.4k
  • 13
  • 23

Java, 92 bytes

int d(int t,int l,int u){int a=0;for(int i=l;i<=u;)if((i+++"").contains(t+""))a++;return a;}

Hooray for the super increment function!