This documentation is automatically generated by competitive-verifier/competitive-verifier
#include "math/number-theory/EulersPhiFunctionTable.hpp"
todo
todo
vector<int> Eulers_phi_function_table(int n) {
vector<int> table(n + 1);
iota(table.begin(), table.end(), 0);
for (int i = 2; i <= n; i++) {
if (table[i] == i) {
for (int j = i; j <= n; j += i) {
table[j] = table[j] / i * (i - 1);
}
}
}
return table;
}
#line 1 "math/number-theory/EulersPhiFunctionTable.hpp"
vector<int> Eulers_phi_function_table(int n) {
vector<int> table(n + 1);
iota(table.begin(), table.end(), 0);
for (int i = 2; i <= n; i++) {
if (table[i] == i) {
for (int j = i; j <= n; j += i) {
table[j] = table[j] / i * (i - 1);
}
}
}
return table;
}