Online JudgeProblem SetAuthorsOnline ContestsUser
Web Board
Home Page
F.A.Qs
Statistical Charts
Problems
Submit Problem
Online Status
Prob.ID:
Register
Update your info
Authors ranklist
Current Contest
Past Contests
Scheduled Contests
Award Contest
User ID:
Password:
  Register

翻译

Posted by zerocpp at 2011-05-16 14:08:32 on Problem 3048
Poj 3048 Max Factor
http://poj.org/problem?id=3048
Max Factor
最大的因子
To improve the organization of his farm, Farmer John labels each of his N (1 <= N <= 5,000) cows with a distinct serial number in the range 1..20,000. Unfortunately, he is unaware that the cows interpret some serial numbers as better than others. In particular, a cow whose serial number has the highest prime factor enjoys the highest social standing among all the other cows. 
为了改进农场的组织,John给每头奶牛(1<=N<=5000)一个独立的序列号(1~20000)。不幸地是,他没有意识到,奶牛对一些序列号的解释更好。特别地,有最大素数因子的奶牛在农场的社会地位最高。

Given a set of N (1 <= N <= 5,000) serial numbers in the range 1..20,000, determine the one that has the largest prime factor.
给N头奶牛的序列号,决定谁的最大素数因子最大。

输入:
* Line 1: A single integer, N 

* Lines 2..N+1: The serial numbers to be tested, one per line
第1行:整数N
第2~N+1行:序列号

输出:
* Line 1: The integer with the largest prime factor. If there are more than one, output the one that appears earliest in the input file.
一行:输出素数因子最大(且最早出现) 的序列号。

Followed by:

Post your reply here:
User ID:
Password:
Title:

Content:

Home Page   Go Back  To top


All Rights Reserved 2003-2013 Ying Fuchen,Xu Pengcheng,Xie Di
Any problem, Please Contact Administrator