This file contains hidden or 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 | |
function backup () { | |
if [ -e $1 -a ! -e $1.bak ]; then | |
cp $1{,.bak} | |
fi | |
} | |
function restore () { | |
cp $1{.bak,} |
This file contains hidden or 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 | |
#たかしくんは栗拾いに出かけました。 | |
#たかしくんは左上から右下に向かって栗を拾いながら進みます。 | |
#たかしくんは下、右のいずれかに進むことができます。 | |
#たかしくんが拾う栗の最大数を算出するプログラムを書いてください。 | |
# | |
#入力例:添付ファイル | |
#各数字が、その場所で拾うことのできる栗の数 | |
my @data = (); |