int main(){ int n; //因此当模m有原根时,它有φ(φ(m))个原根。 while( scanf("%d", &n) != EOF ){ printf("%d\n", eular(eular(n))); } return 0; }
int main() { int m, k; int i; int total; while(~scanf("%d%d", &m, &k)) { if(m == 1) printf("%d\n", k); else { long long res = eular(m); long long cur = k / res; if(k % res == 0) cur--; k = k - cur * res; cur = cur * m + 1; long long i; long long temp; for(i = cur; k != 0; i++) { if(gcd(i, m) == 1) { temp = i; --k; } } printf("%lld\n", temp); } } }
// 根据摄像机方向改变billboard的纹理 bool BillboardSetObject::objectRendering(const MovableObject *mo, const Camera *camera) { const Quaternion &camQ = m_billboardSet->getCamQ(); Vector3 eular(MathEx::QuaternionToEular(camQ)); return true; }
int main() { int n; while(~scanf("%d", &n)) { printf("%d\n", eular(n - 1)); } return 0; }
void eular(int u) { used[u] = 1; int i; while (head[u] != -1) { i = head[u]; head[u] = Next[head[u]]; if (vis[i])continue; vis[i ^ 1] = 1; eular(To[i]); } }
int main() { long long n; int t; scanf("%d",&t); while(t--) { scanf("%lld",&n); printf("%lld\n",eular(n+1)); } return 0; }
void solve(std::istream &in, std::ostream &out) { int t; in >> t; while (t--) { int n, m; in >> n >> m; init(n); rep(i, n) deg[i] = 0; int u, v; rep(i, m) { in >> u >> v; u--, v--; deg[u]++; deg[v]++; addedge(u, v); addedge(v, u); } gao = -1; rep(i, n) { if (deg[i] & 1) { if (gao != -1) { addedge(i, gao); addedge(gao, i); gao = -1; } else gao = i; } } rep(i, n) used[i] = 0; rep(i, n) { if (!used[i]) { eular(i); } } m <<= 1; for (int i = 0; i < m; i += 2) { if (!vis[i])out << 1 << endl; else out << 0 << endl; } }
int print_eular(double x_0, double y_0, double x_n, double step) { double res = eular(x_0,y_0,x_n,step); printf("The result of eular method is : %lf \n\r",res); return 0; }