#include <iostream>
#include <vector>
#include <cstdint>
#include <math.h>
typedef std::vector<std::uint64_t> DType;
typedef std::pair<DType, double> RType;
//Nは与えられてないし、結果を先読みしてそこからNを求めろとは書いてない
//故、任意のNを自作してその最大値を求めることを試みた。
DType MakePrime(std::uint64_t N){
DType R;
R.push_back(2);
bool F = false;
for (std::size_t i = 3; i <= N; i++)
{
F = true;
for (auto o : R){
if (i%o == 0){
F = false;
break;
}
}
if (F == true) R.push_back(i);
}
return R;
}
RType MakeHoge(std::uint64_t N){
std::int64_t X = N;
auto P = MakePrime(static_cast<std::uint64_t>(X));//<- not need??
DType R;
double RD = 1;
while (X>1){
for (auto o : P){
if (X - o > 1){
X -= o;
R.push_back(o);
break;
}
}
}
if (X != 0) R.back() += X;
for (auto o : R) RD *= o;
return std::make_pair(R,RD);
}
bool Show(RType& D){
std::cout << D.second << "@" << D.first.size() << "Count!" << std::endl;
return true;
}
int main(){
RType R;
R=MakeHoge(10);
Show(R);
R=MakeHoge(64);
Show(R);
R=MakeHoge(100);
Show(R);
return 0;
}
I2luY2x1ZGUgPGlvc3RyZWFtPgojaW5jbHVkZSA8dmVjdG9yPgojaW5jbHVkZSA8Y3N0ZGludD4KI2luY2x1ZGUgPG1hdGguaD4KCnR5cGVkZWYgc3RkOjp2ZWN0b3I8c3RkOjp1aW50NjRfdD4gRFR5cGU7CnR5cGVkZWYgc3RkOjpwYWlyPERUeXBlLCBkb3VibGU+IFJUeXBlOwoKLy9O44Gv5LiO44GI44KJ44KM44Gm44Gq44GE44GX44CB57WQ5p6c44KS5YWI6Kqt44G/44GX44Gm44Gd44GT44GL44KJTuOCkuaxguOCgeOCjeOBqOOBr+abuOOBhOOBpuOBquOBhAovL+aVheOAgeS7u+aEj+OBrk7jgpLoh6rkvZzjgZfjgabjgZ3jga7mnIDlpKflgKTjgpLmsYLjgoHjgovjgZPjgajjgpLoqabjgb/jgZ/jgIIKCkRUeXBlIE1ha2VQcmltZShzdGQ6OnVpbnQ2NF90IE4pewoJR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