-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathchallenge.hpp
More file actions
58 lines (43 loc) · 1.4 KB
/
challenge.hpp
File metadata and controls
58 lines (43 loc) · 1.4 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
//
// challenge.hpp
// project-euler
//
// Created by Carlos Álvaro on 15/01/23.
// Copyright © 2023 cdalvaro.io. All rights reserved.
//
#ifndef challenges_c0027_challenge_hpp
#define challenges_c0027_challenge_hpp
#include <string>
#include "challenges/ichallenge.hpp"
namespace challenges {
/**
@class Challenge27
@brief This class is intended to solve Challenge 27
@link https://projecteuler.net/problem=27 @endlink
*/
class Challenge27 : virtual public IChallenge {
public:
//! @copydoc IChallenge::Type_t
using Type_t = long;
/**
@brief Class constructor
@param a_limit The maximum value for the a coefficient
@param b_limit The maximum value for the b coefficient
This is the main constructor of Challenge27 class
*/
Challenge27(const std::size_t &a_limit, const std::size_t &b_limit);
/**
@brief Default destructor
*/
~Challenge27() override = default;
/**
This method contains the algorithm that solves challenge 27
@return The solution for challenge 27
*/
Solution_t solve() final;
private:
std::size_t a_limit; ///< The maximum value for the a coefficient
std::size_t b_limit; ///< The maximum value for the b coefficient
};
} // namespace challenges
#endif /* challenges_c0027_challenge_hpp */