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/env perl | |
use strict; | |
use warnings; | |
use feature 'say'; | |
my $a = 1; | |
my $b = $a; | |
$b *= 10; |
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/env ruby | |
(y, x) = gets.chomp.split(/ /).map(&:to_i) | |
now = [1, 1] | |
addy = 1 | |
addx = 1 | |
puts "#{now[0]}, #{now[1]}" | |
while | |
now[0] += addy | |
now[1] += addx |
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/env ruby | |
(y, x) = gets.chomp.split(/ /).map(&:to_i) | |
now = [1, 1] | |
addy = 1 | |
addx = 1 | |
puts "#{now[0]}, #{now[1]}" | |
while | |
now[0] += addy | |
now[1] += addx |
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
package main | |
import ( | |
"fmt" | |
"math/rand" | |
"time" | |
) | |
const ( | |
clear = "\033[2J" |
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/env perl | |
use strict; | |
use warnings; | |
my ($a, $b, $c) = (1, 2, 3); | |
my ($aa, $bb, $cc) = (1 => 2 => 3); | |
print "$b\n"; | |
print "$cc\n"; |
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/env perl | |
use strict; | |
use warnings; | |
use feature 'say'; | |
use DDP { deparse => 1 }; | |
my $allow = {1 => ['a', 'b', 'c'], 2 => ['d', 'e', 'f']}; |
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
package main | |
import ( | |
"fmt" | |
"sync" | |
) | |
func main() { | |
var wg sync.WaitGroup | |
wg.Add(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
#!/usr/bin/env perl | |
# guess-ad-year.pl - 和暦を引数に与えると西暦年を応えてくれる | |
# ad は A.D. (Anno Domini = 西暦年) の略 | |
# | |
# 例: | |
# guess-ad-year.pl 平成30年 | |
# 2018年 | |
# guess-ad-year.pl 昭和54年 | |
# 1979年 |
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/env perl | |
use strict; | |
use warnings; | |
use feature 'say'; | |
use DDP { deparse => 1 }; | |
my $graph = []; | |
for my $line (<DATA>){ |
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/env perl | |
use strict; | |
use warnings; | |
use feature 'say'; | |
use DDP { deparse => 1 }; | |
print "a b(区間)を入力してください(スペース区切り) >"; | |
chomp(my $input = <STDIN>); |
NewerOlder