📄 e.htm
字号:
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<!-- saved from url=(0044)http://plg.uwaterloo.ca/~acm00/020601/E.html -->
<HTML><HEAD>
<META http-equiv=Content-Type content="text/html; charset=GB18030">
<META content="MSHTML 6.00.2900.2963" name=GENERATOR></HEAD>
<BODY text=#000000 bgColor=#ffffff><IMG src="E.files/familytree.jpg"
align=right>
<H2>Problem E: Relatives</H2>Given <I>n</I>, a positive integer, how many
positive integers less than <I>n</I> are relatively prime to <I>n</I>? Two
integers <I>a</I> and <I>b</I> are relatively prime if there are no integers
<I>x > 1, y > 0, z > 0</I> such that <I>a = xy</I> and <I>b = xz</I>.
<P>There are several test cases. For each test case, standard input contains a
line with <I>n <= 1,000,000,000</I>. A line containing 0 follows the last
case.
<P>For each test case there should be single line of output answering the
question posed above.
<H3>Sample Input</H3><PRE>7
12
0
</PRE>
<H3>Output for Sample Input</H3><PRE>6
4
</PRE></BODY></HTML>
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -