Skip to main content
Commonmark migration
Source Link

#Java 10, 179 105 102 bytes

Java 10, 179 105 102 bytes

(a,b,c)->{var r="#";for(int i=1,t;i<9;)r+=a.substring(t=b.indexOf(c.substring(i,i+=2)),t+2);return r;} 

Whopping -77 bytes thanks to @OlivierGrégoire.

Explanation:

Try it online.

(a,b,c)->{ // Method with String as three parameters and return-type var r="#"; // Result-String, starting at "#" for(int i=1,t;i<9; // Loop `i` from 1 to 9 (exclusive) r+= // Append the result with: a.substring( // A substring from the first input, t=b.indexOf( // where an index is determined in the second input c.substring(i,i+=2)),t+2); // based on a substring of the third input return r;} // Return the result-String 

#Java 10, 179 105 102 bytes

(a,b,c)->{var r="#";for(int i=1,t;i<9;)r+=a.substring(t=b.indexOf(c.substring(i,i+=2)),t+2);return r;} 

Whopping -77 bytes thanks to @OlivierGrégoire.

Explanation:

Try it online.

(a,b,c)->{ // Method with String as three parameters and return-type var r="#"; // Result-String, starting at "#" for(int i=1,t;i<9; // Loop `i` from 1 to 9 (exclusive) r+= // Append the result with: a.substring( // A substring from the first input, t=b.indexOf( // where an index is determined in the second input c.substring(i,i+=2)),t+2); // based on a substring of the third input return r;} // Return the result-String 

Java 10, 179 105 102 bytes

(a,b,c)->{var r="#";for(int i=1,t;i<9;)r+=a.substring(t=b.indexOf(c.substring(i,i+=2)),t+2);return r;} 

Whopping -77 bytes thanks to @OlivierGrégoire.

Explanation:

Try it online.

(a,b,c)->{ // Method with String as three parameters and return-type var r="#"; // Result-String, starting at "#" for(int i=1,t;i<9; // Loop `i` from 1 to 9 (exclusive) r+= // Append the result with: a.substring( // A substring from the first input, t=b.indexOf( // where an index is determined in the second input c.substring(i,i+=2)),t+2); // based on a substring of the third input return r;} // Return the result-String 
edited body
Source Link
Kevin Cruijssen
  • 136.3k
  • 14
  • 155
  • 394

#Java 10, 179 105 102 bytes

(a,b,c)->{varr="#";forvar r="#";for(int i=1,t;i<9;)r+=a.substring(t=b.indexOf(c.substring(i,i+=2)),t+2);return r;} 

Whopping -77 bytes thanks to @OlivierGrégoire.

Explanation:

Try it online.

(a,b,c)->{ // Method with String as three parameters and return-type var r="#"; // Result-String, starting at "#" for(int i=1,t;i<9; // Loop `i` from 1 to 9 (exclusive) r+= // Append the result with: a.substring( // A substring from the first input, t=b.indexOf( // where an index is determined in the second input c.substring(i,i+=2)),t+2); // based on a substring of the third input return r;} // Return the result-String 

#Java 10, 179 105 102 bytes

(a,b,c)->{varr="#";for(int i=1,t;i<9;)r+=a.substring(t=b.indexOf(c.substring(i,i+=2)),t+2);return r;} 

Whopping -77 bytes thanks to @OlivierGrégoire.

Explanation:

Try it online.

(a,b,c)->{ // Method with String as three parameters and return-type var r="#"; // Result-String, starting at "#" for(int i=1,t;i<9; // Loop `i` from 1 to 9 (exclusive) r+= // Append the result with: a.substring( // A substring from the first input, t=b.indexOf( // where an index is determined in the second input c.substring(i,i+=2)),t+2); // based on a substring of the third input return r;} // Return the result-String 

#Java 10, 179 105 102 bytes

(a,b,c)->{var r="#";for(int i=1,t;i<9;)r+=a.substring(t=b.indexOf(c.substring(i,i+=2)),t+2);return r;} 

Whopping -77 bytes thanks to @OlivierGrégoire.

Explanation:

Try it online.

(a,b,c)->{ // Method with String as three parameters and return-type var r="#"; // Result-String, starting at "#" for(int i=1,t;i<9; // Loop `i` from 1 to 9 (exclusive) r+= // Append the result with: a.substring( // A substring from the first input, t=b.indexOf( // where an index is determined in the second input c.substring(i,i+=2)),t+2); // based on a substring of the third input return r;} // Return the result-String 
added 9 characters in body
Source Link
Kevin Cruijssen
  • 136.3k
  • 14
  • 155
  • 394

#Java 810, 179 105105 102 bytes

(a,b,c)->{String r="#";forvarr="#";for(int i=1,t;i<9;)r+=a.substring(t=b.indexOf(c.substring(i,i+=2)),t+2);return r;} 

Whopping -7477 bytes thanks to @OlivierGrégoire.

Explanation:

Try it online.Try it online.

(a,b,c)->{ // Method with String as three parameters and return-type Stringvar r="#";  // Result-String, starting at "#" for(int i=1,t;i<9; // Loop `i` from 1 to 9 (exclusive) r+= // Append the result with: a.substring( // A substring from the first input, t=b.indexOf( // where an index is determined in the second input c.substring(i,i+=2)),t+2); // based on a substring of the third input return r;} // Return the result-String 

#Java 8, 179 105 bytes

(a,b,c)->{String r="#";for(int i=1,t;i<9;)r+=a.substring(t=b.indexOf(c.substring(i,i+=2)),t+2);return r;} 

Whopping -74 bytes thanks to @OlivierGrégoire.

Explanation:

Try it online.

(a,b,c)->{ // Method with String as three parameters and return-type String r="#"; // Result-String, starting at "#" for(int i=1,t;i<9; // Loop `i` from 1 to 9 (exclusive) r+= // Append the result with: a.substring( // A substring from the first input, t=b.indexOf( // where an index is determined in the second input c.substring(i,i+=2)),t+2); // based on a substring of the third input return r;} // Return the result-String 

#Java 10, 179 105 102 bytes

(a,b,c)->{varr="#";for(int i=1,t;i<9;)r+=a.substring(t=b.indexOf(c.substring(i,i+=2)),t+2);return r;} 

Whopping -77 bytes thanks to @OlivierGrégoire.

Explanation:

Try it online.

(a,b,c)->{ // Method with String as three parameters and return-type var r="#";  // Result-String, starting at "#" for(int i=1,t;i<9; // Loop `i` from 1 to 9 (exclusive) r+= // Append the result with: a.substring( // A substring from the first input, t=b.indexOf( // where an index is determined in the second input c.substring(i,i+=2)),t+2); // based on a substring of the third input return r;} // Return the result-String 
deleted 395 characters in body
Source Link
Kevin Cruijssen
  • 136.3k
  • 14
  • 155
  • 394
Loading
Source Link
Kevin Cruijssen
  • 136.3k
  • 14
  • 155
  • 394
Loading