line |
stmt |
bran |
cond |
sub |
pod |
time |
code |
1
|
1
|
|
|
1
|
|
3423
|
use strict; |
|
1
|
|
|
|
|
3
|
|
|
1
|
|
|
|
|
42
|
|
2
|
1
|
|
|
1
|
|
6
|
use warnings; |
|
1
|
|
|
|
|
2
|
|
|
1
|
|
|
|
|
48
|
|
3
|
|
|
|
|
|
|
package Project::Euler; |
4
|
|
|
|
|
|
|
BEGIN { |
5
|
1
|
|
|
1
|
|
26
|
$Project::Euler::VERSION = '0.20'; |
6
|
|
|
|
|
|
|
} |
7
|
|
|
|
|
|
|
|
8
|
1
|
|
|
1
|
|
2450
|
use Modern::Perl; |
|
1
|
|
|
|
|
38756
|
|
|
1
|
|
|
|
|
8
|
|
9
|
1
|
|
|
1
|
|
256
|
use 5.010; # So Dist::Zilla picks it up |
|
1
|
|
|
|
|
4
|
|
|
1
|
|
|
|
|
58
|
|
10
|
|
|
|
|
|
|
|
11
|
|
|
|
|
|
|
#ABSTRACT: Solutions for L<< http://projecteuler.net >> |
12
|
|
|
|
|
|
|
|
13
|
|
|
|
|
|
|
|
14
|
|
|
|
|
|
|
|
15
|
|
|
|
|
|
|
|
16
|
|
|
|
|
|
|
|
17
|
|
|
|
|
|
|
1; # End of Project::Euler |
18
|
|
|
|
|
|
|
|
19
|
|
|
|
|
|
|
__END__ |
20
|
|
|
|
|
|
|
=pod |
21
|
|
|
|
|
|
|
|
22
|
|
|
|
|
|
|
=head1 NAME |
23
|
|
|
|
|
|
|
|
24
|
|
|
|
|
|
|
Project::Euler - Solutions for L<< http://projecteuler.net >> |
25
|
|
|
|
|
|
|
|
26
|
|
|
|
|
|
|
=head1 VERSION |
27
|
|
|
|
|
|
|
|
28
|
|
|
|
|
|
|
version 0.20 |
29
|
|
|
|
|
|
|
|
30
|
|
|
|
|
|
|
=head1 SYNOPSIS |
31
|
|
|
|
|
|
|
|
32
|
|
|
|
|
|
|
use Project::Euler::Problem::P001; |
33
|
|
|
|
|
|
|
my $problem1 = Project::Euler::Problem::P001->new; |
34
|
|
|
|
|
|
|
|
35
|
|
|
|
|
|
|
$problem1->solve; |
36
|
|
|
|
|
|
|
print $problem1->status; |
37
|
|
|
|
|
|
|
|
38
|
|
|
|
|
|
|
=head1 DESCRIPTION |
39
|
|
|
|
|
|
|
|
40
|
|
|
|
|
|
|
This is the base class which will eventually be responsible for displaying the |
41
|
|
|
|
|
|
|
interface to interact with the solutions implemented so far. |
42
|
|
|
|
|
|
|
|
43
|
|
|
|
|
|
|
For now, you will have to manually import the problem_solutions and solve them manually. |
44
|
|
|
|
|
|
|
|
45
|
|
|
|
|
|
|
=head1 LIBRARIES |
46
|
|
|
|
|
|
|
|
47
|
|
|
|
|
|
|
These libraries are used by the problem solutions: |
48
|
|
|
|
|
|
|
|
49
|
|
|
|
|
|
|
=over 4 |
50
|
|
|
|
|
|
|
|
51
|
|
|
|
|
|
|
=item 1 |
52
|
|
|
|
|
|
|
|
53
|
|
|
|
|
|
|
L<< Project::Euler::Lib::Utils >> |
54
|
|
|
|
|
|
|
|
55
|
|
|
|
|
|
|
=item 2 |
56
|
|
|
|
|
|
|
|
57
|
|
|
|
|
|
|
L<< Project::Euler::Lib::Types >> |
58
|
|
|
|
|
|
|
|
59
|
|
|
|
|
|
|
=back |
60
|
|
|
|
|
|
|
|
61
|
|
|
|
|
|
|
=head1 PROBLEMS |
62
|
|
|
|
|
|
|
|
63
|
|
|
|
|
|
|
These problems are fully implemented so far (extending the base class L<< Project::Euler::Problem::Base >>) |
64
|
|
|
|
|
|
|
|
65
|
|
|
|
|
|
|
=over 4 |
66
|
|
|
|
|
|
|
|
67
|
|
|
|
|
|
|
=item 1 |
68
|
|
|
|
|
|
|
|
69
|
|
|
|
|
|
|
L<< Project::Euler::Problem::P001 >> |
70
|
|
|
|
|
|
|
|
71
|
|
|
|
|
|
|
=item 2 |
72
|
|
|
|
|
|
|
|
73
|
|
|
|
|
|
|
L<< Project::Euler::Problem::P002 >> |
74
|
|
|
|
|
|
|
|
75
|
|
|
|
|
|
|
=item 3 |
76
|
|
|
|
|
|
|
|
77
|
|
|
|
|
|
|
L<< Project::Euler::Problem::P003 >> |
78
|
|
|
|
|
|
|
|
79
|
|
|
|
|
|
|
=item 4 |
80
|
|
|
|
|
|
|
|
81
|
|
|
|
|
|
|
L<< Project::Euler::Problem::P004 >> |
82
|
|
|
|
|
|
|
|
83
|
|
|
|
|
|
|
=item 5 |
84
|
|
|
|
|
|
|
|
85
|
|
|
|
|
|
|
L<< Project::Euler::Problem::P005 >> |
86
|
|
|
|
|
|
|
|
87
|
|
|
|
|
|
|
=back |
88
|
|
|
|
|
|
|
|
89
|
|
|
|
|
|
|
=head1 AUTHOR |
90
|
|
|
|
|
|
|
|
91
|
|
|
|
|
|
|
Adam Lesperance <lespea@gmail.com> |
92
|
|
|
|
|
|
|
|
93
|
|
|
|
|
|
|
=for :stopwords CPAN AnnoCPAN RT CPANTS Kwalitee diff |
94
|
|
|
|
|
|
|
|
95
|
|
|
|
|
|
|
=head1 SUPPORT |
96
|
|
|
|
|
|
|
|
97
|
|
|
|
|
|
|
You can find documentation for this module with the perldoc command. |
98
|
|
|
|
|
|
|
|
99
|
|
|
|
|
|
|
perldoc Project::Euler |
100
|
|
|
|
|
|
|
|
101
|
|
|
|
|
|
|
=head2 Websites |
102
|
|
|
|
|
|
|
|
103
|
|
|
|
|
|
|
=over 4 |
104
|
|
|
|
|
|
|
|
105
|
|
|
|
|
|
|
=item * |
106
|
|
|
|
|
|
|
|
107
|
|
|
|
|
|
|
Search CPAN |
108
|
|
|
|
|
|
|
|
109
|
|
|
|
|
|
|
L<http://search.cpan.org/dist/Project-Euler> |
110
|
|
|
|
|
|
|
|
111
|
|
|
|
|
|
|
=item * |
112
|
|
|
|
|
|
|
|
113
|
|
|
|
|
|
|
AnnoCPAN: Annotated CPAN documentation |
114
|
|
|
|
|
|
|
|
115
|
|
|
|
|
|
|
L<http://annocpan.org/dist/Project-Euler> |
116
|
|
|
|
|
|
|
|
117
|
|
|
|
|
|
|
=item * |
118
|
|
|
|
|
|
|
|
119
|
|
|
|
|
|
|
CPAN Ratings |
120
|
|
|
|
|
|
|
|
121
|
|
|
|
|
|
|
L<http://cpanratings.perl.org/d/Project-Euler> |
122
|
|
|
|
|
|
|
|
123
|
|
|
|
|
|
|
=item * |
124
|
|
|
|
|
|
|
|
125
|
|
|
|
|
|
|
CPAN Forum |
126
|
|
|
|
|
|
|
|
127
|
|
|
|
|
|
|
L<http://cpanforum.com/dist/Project-Euler> |
128
|
|
|
|
|
|
|
|
129
|
|
|
|
|
|
|
=item * |
130
|
|
|
|
|
|
|
|
131
|
|
|
|
|
|
|
RT: CPAN's Bug Tracker |
132
|
|
|
|
|
|
|
|
133
|
|
|
|
|
|
|
L<http://rt.cpan.org/NoAuth/Bugs.html?Dist=Project-Euler> |
134
|
|
|
|
|
|
|
|
135
|
|
|
|
|
|
|
=item * |
136
|
|
|
|
|
|
|
|
137
|
|
|
|
|
|
|
CPANTS Kwalitee |
138
|
|
|
|
|
|
|
|
139
|
|
|
|
|
|
|
L<http://cpants.perl.org/dist/overview/Project-Euler> |
140
|
|
|
|
|
|
|
|
141
|
|
|
|
|
|
|
=item * |
142
|
|
|
|
|
|
|
|
143
|
|
|
|
|
|
|
CPAN Testers Results |
144
|
|
|
|
|
|
|
|
145
|
|
|
|
|
|
|
L<http://cpantesters.org/distro/P/Project-Euler.html> |
146
|
|
|
|
|
|
|
|
147
|
|
|
|
|
|
|
=item * |
148
|
|
|
|
|
|
|
|
149
|
|
|
|
|
|
|
CPAN Testers Matrix |
150
|
|
|
|
|
|
|
|
151
|
|
|
|
|
|
|
L<http://matrix.cpantesters.org/?dist=Project-Euler> |
152
|
|
|
|
|
|
|
|
153
|
|
|
|
|
|
|
=item * |
154
|
|
|
|
|
|
|
|
155
|
|
|
|
|
|
|
Source Code Repository |
156
|
|
|
|
|
|
|
|
157
|
|
|
|
|
|
|
The code is open to the world, and available for you to hack on. Please feel free to browse it and play |
158
|
|
|
|
|
|
|
with it, or whatever. If you want to contribute patches, please send me a diff or prod me to pull |
159
|
|
|
|
|
|
|
from your repository :) |
160
|
|
|
|
|
|
|
|
161
|
|
|
|
|
|
|
L<git://github.com/lespea/Project-Euler> |
162
|
|
|
|
|
|
|
|
163
|
|
|
|
|
|
|
=back |
164
|
|
|
|
|
|
|
|
165
|
|
|
|
|
|
|
=head2 Bugs |
166
|
|
|
|
|
|
|
|
167
|
|
|
|
|
|
|
Please report any bugs or feature requests to C<bug-project-euler at rt.cpan.org>, or through |
168
|
|
|
|
|
|
|
the web interface at L<http://rt.cpan.org/NoAuth/ReportBug.html?Queue=Project-Euler>. I will be |
169
|
|
|
|
|
|
|
notified, and then you'll automatically be notified of progress on your bug as I make changes. |
170
|
|
|
|
|
|
|
|
171
|
|
|
|
|
|
|
=head1 COPYRIGHT AND LICENSE |
172
|
|
|
|
|
|
|
|
173
|
|
|
|
|
|
|
This software is copyright (c) 2010 by Adam Lesperance. |
174
|
|
|
|
|
|
|
|
175
|
|
|
|
|
|
|
This is free software; you can redistribute it and/or modify it under |
176
|
|
|
|
|
|
|
the same terms as the Perl 5 programming language system itself. |
177
|
|
|
|
|
|
|
|
178
|
|
|
|
|
|
|
=cut |
179
|
|
|
|
|
|
|
|