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/env perl | |
| use strict; | |
| use warnings; | |
| use feature 'say'; | |
| my @player_a = (1, 5, 10); | |
| my @player_b = (2, 2, 2); | |
| my %winer = ( | |
| pa => 0, |
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/env perl | |
| use strict; | |
| use warnings; | |
| use feature 'say'; | |
| my @player_a = (1, 5, 10); | |
| my @player_b = (2, 2, 2); | |
| my %winer = ( | |
| pa => 0, |
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/env ruby | |
| n = gets.chomp.to_i | |
| a = gets.chomp.split(/ /).map(&:to_i) | |
| ans = gets.chomp.to_i | |
| dp = [] | |
| (0..n).each do |i| | |
| dp << [] | |
| (0..ans).each do |a| | |
| dp[i][a] = false |
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/env ruby | |
| n = gets.chomp.to_i | |
| a = gets.chomp.split(/ /).map(&:to_i) | |
| ans = gets.chomp.to_i | |
| dp= [] | |
| sums = [] | |
| (0..(n - 1)).each do |i| | |
| if(dp[ans - a[i]] && (ans - a[i]) > 0) |
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/env perl | |
| use strict; | |
| use warnings; | |
| use utf8; | |
| use feature 'say'; | |
| use List::Util 'max'; | |
| chomp(my $input = <STDIN>); |
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
| import Foundation | |
| var i : Int = 0 | |
| var f : Float = 0.0 | |
| for _ in (1...10) { | |
| f += 0.1 | |
| i += 1 | |
| } |
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/env perl | |
| use strict; | |
| use warnings; | |
| my $f = 0.0; | |
| my $i = 0; | |
| for (1..10000){ | |
| $f += 0.0001; |
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
| #include <stdio.h> | |
| int main() { | |
| float f = 0.0; | |
| int j = 0; | |
| for (int i = 0; i < 100; i++){ | |
| f += 0.01; | |
| j += 1; | |
| } | |
| printf("%f\n", f); |
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
| use strict; | |
| use warnings; | |
| binmode STDOUT, ":utf8"; | |
| use Data::Dumper; | |
| my $alice = { | |
| name => 'Alice', | |
| country => 'England', | |
| perl => 60, |
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
| use strict; | |
| use warnings; | |
| use Data::Dumper; | |
| my $prof1 = { | |
| name => 'tomcha_', | |
| favorite_foods => [ | |
| '衣笠丼', | |
| '寿司', |