e.htm

来自「ACM精彩程序02(University_of_Waterloo_2_1_Jun」· HTM 代码 · 共 24 行

HTM
24
字号
<!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 &gt; 1, y &gt; 0, z &gt; 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 &lt;= 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 + =
减小字号Ctrl + -
显示快捷键?