Skip to content

Instantly share code, notes, and snippets.

@ichirin2501
ichirin2501 / PE26.pl
Created August 17, 2012 13:13
Project Euler 26
#!/usr/bin/perl
use strict;
use warnings;
use Data::Dumper;
my $ans = -1;
my $mx = 0;
for(2..999){
@ichirin2501
ichirin2501 / PE25.pl
Created August 16, 2012 12:20
Project Euler 25
#!/usr/bin/perl
use strict;
use warnings;
use Data::Dumper;
use bigint;
my ($a, $b, $idx) = (1, 1, 1);
while(1){
if( length($a) >= 1000 ){
@ichirin2501
ichirin2501 / PE23.pl
Created August 14, 2012 02:23
Project Euler 23
#!/usr/bin/perl
use strict;
use warnings;
use Data::Dumper;
use List::Util qw/sum/;
sub factor{
my $n = shift;
my %hash = ();
@ichirin2501
ichirin2501 / PE22.pl
Created August 13, 2012 15:59
Project Euler 22
#!perl -apnF','
$c++,s/[^"]/$s+=(ord($&)-64)*$c/eg for sort@F;
$_=$s;
@ichirin2501
ichirin2501 / srm460_div2_medium.cpp
Created September 4, 2011 00:37
srm460::div2::medium
#include <iostream>
#include <algorithm>
#include <vector>
#include <cstdio>
using namespace std;
class TheFansAndMeetingsDivTwo{
public:
double find(vector <int> minJ, vector <int> maxJ, vector <int> minB, vector <int> maxB){
double ret = 0.0;