我爱占星网 我爱占星网
首页
编程
java
php
前端
首页 编程 java php 前端

Relatives

Description

Given n, a positive integer, how many positive integers less than n are relatively prime to n? Two integers a and b are relatively prime if there are no integers x > 1, y > 0, z > 0 such that a = xy and b = xz.
Input

There are several test cases. For each test case, standard input contains a line with n <= 1,000,000,000. A line containing 0 follows the last case.
Output

For each test case there should be single line of output answering the question posed above.
Sample Input

7
12
0
Sample Output

6
4

http://www.2cto.com/kf/201504/388360.html

近期文章

  • 求助大神!!!没有接口号,怎么识别请求报文,并获取其内容??
  • Django应用内存限制问题
  • linux配置jdk老是失败
  • Django应用内存限制问题
  • Android启动相机保存住不到指定文件夹里
  • weblogic10安装启动完成,访问不了管理页面
  • 求大神相助,完全不知道错误在哪
  • 找不到或无法加载主类 org.apache.catalina.startup.Bootstrap
  • Anagram Groups
  • VM 已启动: 错误: 找不到或无法加载主类
  • nginx tomcat 负载均衡
  • Ongl表达式可以获取List集合,但是不能获取集合中对象的属性
  • nginx tomcat f负载均衡
  • Fermat vs. Pythagoras
  • 如何通过限位传感器控制步进电机进行往重复返运行?
  • springmvc如何映射视图及控制器
  • 女生自学,为什么代码全对还出现这些问题?
  • 串口程序第一个字符接受不到是什么原因啊?
  • RootedTree
  • cmd和dos的区别是什么

Copyright ©2022 我爱占星 All Rights Reserved.

浙ICP备2022030071号-1

部分图文来自网络,如有侵犯您的版权,请告诉我们删除

友情链接:代码精华