From 9400bf480db78383115999d39a0a014f372f4936 Mon Sep 17 00:00:00 2001 From: Zengtudor Date: Sun, 29 Dec 2024 10:37:23 +0800 Subject: [PATCH] update --- src/12/c14/c14_prime.cpp | 49 ++++++++++++++++++++++++++++++++++++++++ 1 file changed, 49 insertions(+) create mode 100644 src/12/c14/c14_prime.cpp diff --git a/src/12/c14/c14_prime.cpp b/src/12/c14/c14_prime.cpp new file mode 100644 index 0000000..f77ee0b --- /dev/null +++ b/src/12/c14/c14_prime.cpp @@ -0,0 +1,49 @@ +#include +#include +#include +#include +#include + +using namespace std; + +template +ostream&operator<<(ostream &os,vector const& v){ + os<<"{ "; + if(v.size()==0){ + os<<" }"; + }else{ + for(size_t i=0;i getPrimes(int const& end){ + vector isFactor(end+1,false); + for(int i=2;i primes; + for(int i=2;i