This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
L=$((LINES/2)) | |
function f() | |
{ | |
for A in $(seq $L); do | |
for B in $(seq $L); do | |
[ $A -lt $B ] && C=' ' || C=x | |
echo -n "$C " | |
done | |
echo |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/awk -f | |
BEGIN { | |
FS = "|"; | |
OFS = "|"; | |
} | |
(NR == 1) { | |
for (b = 1; b <= NF; b++) { | |
hdr[b] = $b; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/awk -f | |
BEGIN { | |
} | |
{ | |
top = $1$2$3; | |
mid = $4$5$6; | |
bot = $7$8$9; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/perl | |
use strict; | |
use Algorithm::Permute; | |
Algorithm::Permute::permute { | |
print "@ARGV\n"; | |
} @ARGV; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
5 digit combination | |
sum of the cubes of the first three digits is equal to the first three digits | |
sum of factorials of the latter three digits is equal to the last three digits |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
for sum in {399..350..-1}; do | |
for red in {4..200}; do | |
blue=$((sum-red)) | |
num1=$red | |
den1=$((blue+red)) | |
num2=$((red-1)) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
arithmetic progression | |
digits replaced by letters | |
progression includes term 10000 | |
progression starts | |
I, GO, UP, AND | |
what's the value of POUND? |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
sign | |
l = length in cm | |
w = width in cm | |
l = 2w | |
(sum length digits)^2 - l = w | |
(sum width digits)^2 - w = l |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
cards numbered 1-9 | |
laid out in ascending order | |
cards redealt, no card in original place | |
last 6 digits form the square of the first three digits |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
rm -f list{1,2} | |
for ((a = 1; a < 20; a++)); do | |
for ((b = a+1; b < 20; b++)); do | |
for ((c = b+1; c < 20; c++)); do | |
for ((d = c+1; d < 20; d++)); do | |
for ((e = d+1; e < 20; e++)); do | |
echo $a $b $c $d $e >> list-number |
OlderNewer