#Java 10, (削除) 72 (削除ここまで) 65 bytes
Java 10, (削除) 72 (削除ここまで) 65 bytes
d->{var r=d.clone();for(int i=54;i-->0;r[i*7%54]=d[i]);return r;}
Similar as @GB's Ruby answer, but by using i*7%54 on the result-array, instead of i*17%54 on the input-array to save a byte.
Explanation:
d->{ // Method with String-array as both parameter and return-type
var r=d.clone();// Result-String, starting as a copy of the input
for(int i=54;i-->0;
// Loop `i` in the range (54, 0]
r[ // Set an item in the result-array at index:
i*7%54 // Index `i` multiplied by 7, and then take modulo-54
]=d[i]); // To the `i`'th item in the input-Deck
return r;} // Return the result-Array
#Java 10, (削除) 72 (削除ここまで) 65 bytes
d->{var r=d.clone();for(int i=54;i-->0;r[i*7%54]=d[i]);return r;}
Similar as @GB's Ruby answer, but by using i*7%54 on the result-array, instead of i*17%54 on the input-array to save a byte.
Explanation:
d->{ // Method with String-array as both parameter and return-type
var r=d.clone();// Result-String, starting as a copy of the input
for(int i=54;i-->0;
// Loop `i` in the range (54, 0]
r[ // Set an item in the result-array at index:
i*7%54 // Index `i` multiplied by 7, and then take modulo-54
]=d[i]); // To the `i`'th item in the input-Deck
return r;} // Return the result-Array
Java 10, (削除) 72 (削除ここまで) 65 bytes
d->{var r=d.clone();for(int i=54;i-->0;r[i*7%54]=d[i]);return r;}
Similar as @GB's Ruby answer, but by using i*7%54 on the result-array, instead of i*17%54 on the input-array to save a byte.
Explanation:
d->{ // Method with String-array as both parameter and return-type
var r=d.clone();// Result-String, starting as a copy of the input
for(int i=54;i-->0;
// Loop `i` in the range (54, 0]
r[ // Set an item in the result-array at index:
i*7%54 // Index `i` multiplied by 7, and then take modulo-54
]=d[i]); // To the `i`'th item in the input-Deck
return r;} // Return the result-Array
#Java 10, (削除) 72 (削除ここまで) 65 bytes bytes
d->{var r=d.clone();for(int i=54;i-->0;r[i*7%54]=d[i]);return r;}
Similar as @GB's Ruby answer, but by using 7i*7%54 on the result-array, instead of 17i*17%54 on the input-array to save a byte.
Explanation:
d->{ // Method with String-array as both parameter and return-type
var r=d.clone();// Result-String, starting as a copy of the input
for(int i=54;i-->0;
// Loop `i` in the range (54, 0]
r[ // InsertSet an item toin the result-array at index:
i*7%54 // Index `i` multiplied by 7, and then take modulo-54
]=d[i]); // To the `i`'th item in the input-Deck
return r;} // Return the result-Array
#Java 10, (削除) 72 (削除ここまで) 65 bytes
d->{var r=d.clone();for(int i=54;i-->0;r[i*7%54]=d[i]);return r;}
Similar as @GB's Ruby answer, but by using 7 instead of 17.
Explanation:
d->{ // Method with String-array as both parameter and return-type
var r=d.clone();// Result-String, starting as a copy of the input
for(int i=54;i-->0;
// Loop `i` in the range (54, 0]
r[ // Insert an item to the result-array at index:
i*7%54 // Index `i` multiplied by 7, and then take modulo-54
]=d[i]); // To the `i`'th item in the input-Deck
return r;} // Return the result-Array
#Java 10, (削除) 72 (削除ここまで) 65 bytes
d->{var r=d.clone();for(int i=54;i-->0;r[i*7%54]=d[i]);return r;}
Similar as @GB's Ruby answer, but by using i*7%54 on the result-array, instead of i*17%54 on the input-array to save a byte.
Explanation:
d->{ // Method with String-array as both parameter and return-type
var r=d.clone();// Result-String, starting as a copy of the input
for(int i=54;i-->0;
// Loop `i` in the range (54, 0]
r[ // Set an item in the result-array at index:
i*7%54 // Index `i` multiplied by 7, and then take modulo-54
]=d[i]); // To the `i`'th item in the input-Deck
return r;} // Return the result-Array
#Java 10, 72(削除) 72 (削除ここまで) 65 bytes
d->{var r=d.clone();for(int i=d.length;ii=54;i-->0;r[i*7%54]=d[i]);return r;}
Similar as @GB's Ruby answer, but by using 7 instead of 17.
Explanation:
d->{ // Method with String-array as both parameter and return-type
var r=d.clone();// Result-String, starting as a copy of the input
for(int i=d.length;ii=54;i-->0;
// Loop `i` in the range (length_of_input54, 0]
r[ // Insert an item to the result-array at index:
i*7%54 // Index `i` multiplied by 7, and then take modulo-54 (Deck-size)
]=d[i]); // To the `i`'th item in the input-Deck
return r;} // Return the result-Array
#Java 10, 72 bytes
d->{var r=d.clone();for(int i=d.length;i-->0;r[i*7%54]=d[i]);return r;}
Similar as @GB's Ruby answer, but by using 7 instead of 17.
Explanation:
d->{ // Method with String-array as both parameter and return-type
var r=d.clone();// Result-String, starting as a copy of the input
for(int i=d.length;i-->0;
// Loop `i` in the range (length_of_input, 0]
r[ // Insert an item to the result-array at index:
i*7%54 // Index `i` multiplied by 7, and then take modulo-54 (Deck-size)
]=d[i]); // To the `i`'th item in the input-Deck
return r;} // Return the result-Array
#Java 10, (削除) 72 (削除ここまで) 65 bytes
d->{var r=d.clone();for(int i=54;i-->0;r[i*7%54]=d[i]);return r;}
Similar as @GB's Ruby answer, but by using 7 instead of 17.
Explanation:
d->{ // Method with String-array as both parameter and return-type
var r=d.clone();// Result-String, starting as a copy of the input
for(int i=54;i-->0;
// Loop `i` in the range (54, 0]
r[ // Insert an item to the result-array at index:
i*7%54 // Index `i` multiplied by 7, and then take modulo-54
]=d[i]); // To the `i`'th item in the input-Deck
return r;} // Return the result-Array