-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathchallenge.hpp
More file actions
53 lines (40 loc) · 1.2 KB
/
challenge.hpp
File metadata and controls
53 lines (40 loc) · 1.2 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
//
// challenge.hpp
// Challenges
//
// Created by Carlos Álvaro on 14/06/2020.
// Copyright © 2020 cdalvaro. All rights reserved.
//
#ifndef challenges_c0007_challenge_hpp
#define challenges_c0007_challenge_hpp
#include "challenges/ichallenge.hpp"
namespace challenges {
/**
@class Challenge7
@brief This class is intended to solve Challenge 7
@link https://projecteuler.net/problem=7 @endlink
*/
class Challenge7 : virtual public IChallenge {
public:
//! @copydoc IChallenge::Type_t
using Type_t = std::size_t;
/**
@brief Class constructor
This is the main constructor of Challenge7 class
@param nth_prime The nth prime number to find
*/
explicit Challenge7(const Type_t &nth_prime);
/**
@brief Default destructor
*/
~Challenge7() override = default;
/**
This method contains the algorithm that solves challenge 7
@return The solution for challenge 7
*/
Solution_t solve() final;
private:
Type_t nth_prime; ///< The nth prime number to find
};
} // namespace challenges
#endif /* challenges_c0007_challenge_hpp */