123456789101112131415 |
- #include <bits/stdc++.h>
- using namespace std;
- #include "Euler.cpp"
- int main() {
- int n = 15;
- int res[] = {-1,1,1,2,2,4,2,6,4,6,4,10,4,12,6,8};
- phi_table(n);
- for (int i = 1; i <= n; i++){
- assert(phi[i] == euler_phi(i));
- assert(phi[i] == res[i]);
- }
- return 0;
- }
|