#include <cstdio>
#include <iostream>
using namespace std;
int phi(int x)
{
    int t=x;
    ;i<=x;i++)
    {
        )
        {
           t=t/i*(i-);
           x=x/i;
        }
        )
        {
            x/=i;
        }
    }
    return t;
}
int main()
{
    //freopen("in.txt","r",stdin);
    int n;
    )
    {
        cout << phi(n) <<endl;
    }
}

【纯欧拉函数】 poj 2407的更多相关文章

  1. POJ 2407 (欧拉函数)

    题目链接: http://poj.org/problem?id=2407 题目大意:求小于n且与n互质的正整数个数. 解题思路: 欧拉函数=小于n且与n互质的正整数个数. 公式=n*(1-1/P1)* ...

  2. POJ 2407 Relatives(欧拉函数)

    http://poj.org/problem?id=2407 题意: 给出一个n,求小于等于的n的数中与n互质的数有几个. 思路: 欧拉函数的作用就是用来求这个的. #include<iostr ...

  3. poj 2407 欧拉函数裸题

    http://poj.org/problem?id=2407 题意:多组数据,每次输入一个数 ,求这个数的欧拉函数 int euler_phi(int n){//单个欧拉函数 int m=(int)s ...

  4. 数论 - 欧拉函数模板题 --- poj 2407 : Relatives

    Relatives Time Limit: 1000MS   Memory Limit: 65536K Total Submissions: 11372   Accepted: 5544 Descri ...

  5. POJ 2407 Relatives 【欧拉函数】

    裸欧拉函数. #include<stdio.h> #include<string.h> ; int p[N],pr[N],cnt; void init(){ ;i<N;i ...

  6. POJ 2407 Relatives(欧拉函数)

    题目链接 题意 : 求小于等于n中与n互质的数的个数. 思路 : 看数学的时候有一部分是将欧拉函数的,虽然我没怎么看懂,但是模板我记得了,所以直接套了一下模板. 这里是欧拉函数的简介. #includ ...

  7. POJ 2407 Relatives (欧拉函数)

    题目链接 Description Given n, a positive integer, how many positive integers less than n are relatively ...

  8. POJ 2407 Relatives【欧拉函数】

    <题目链接> 题目大意: Given n, a positive integer, how many positive integers less than n are relativel ...

  9. POJ 2407 Relatives(欧拉函数入门题)

    Relatives Given n, a positive integer, how many positive integers less than n are relatively prime t ...

随机推荐

  1. DOM和BOM

    DOM:http://www.cnblogs.com/slfyeye/articles/850247.html BOM : http://www.cnblogs.com/zfc2201/p/34531 ...

  2. HDU 1564 Play a game

    Description New Year is Coming! ailyanlu is very happy today! and he is playing a chessboard game wi ...

  3. Django中使用Bootstrap

    一.在Django中引用Bootstrap模版 1.首先下载bootsrtap代码(http://v3.bootcss.com/getting-started/#download),并将下载后的文件放 ...

  4. CentOS 修改主机名

    最新文章:Virson's Blog 1.临时修改主机名 地址:http://www.cnblogs.com/mawanglin2008/p/3530790.html 显示主机名: oracle@lo ...

  5. Chapter 14_5 _ENV和load

    load在加载代码块时,通常使用全局环境去初始化代码块的_ENV上值. 然而,load选项的第四个参数给出的值就是供_ENV用的.(loadfile函数参数也是一样) 举一个有关初始化的例子,假如我们 ...

  6. Unity3D 回合制 网上源码 目前还在研究构思

    我们已将回合制的战斗模式讲解得很清楚了.那么,如果在Unity3D游戏中实现一个回合制游戏呢?我们从最简单的一对一模式来设计回合制游戏的原型.我们可以游戏的状态划分为下面三种状态:        1. ...

  7. 读取文件—open()、read()

    摘自:http://www.iplaypython.com/sys/open.html 在Windows下的powershell打开python: Win+R打开运行窗口,输入powershell,输 ...

  8. UILabel 的属性设置

    .设置字体样式(加粗) label.font = [UIFont boldSystemFontOfSize:30]; 6.设置字体类型 label.font = [UIFont fontWithNam ...

  9. C - 哗啦啦村的扩建

    C - 哗啦啦村的扩建 Time Limit: 2000/1000MS (Java/Others)    Memory Limit: 512000/256000KB (Java/Others) Sub ...

  10. 1001. A+B Format

    Calculate a + b and output the sum in standard format -- that is, the digits must be separated into ...