2.12题目翻译

https://acs.jxnu.edu.cn/problem/HDU1323

描述:

From the article Number Theory in the 1994 Microsoft Encarta: "If a, b, c are integers such that a = bc, a is called a multiple of b or of c, and b or c is called a divisor or factor of a. If c is not 1/-1, b is called a proper divisor of a. Even integers, which include 0, are multiples of 2, for example, -4, 0, 2, 10; an odd integer is an integer that is not even, for example, -5, 1, 3, 9. A perfect number is a positive integer that is equal to the sum of all its positive, proper divisors; for example, 6, which equals 1 + 2 + 3, and 28, which equals 1 + 2 + 4 + 7 + 14, are perfect numbers. A positive number that is not perfect is imperfect and is deficient or abundant according to whether the sum of its positive, proper divisors is smaller or larger than the number itself. Thus, 9, with proper divisors 1, 3, is deficient; 12, with proper divisors 1, 2, 3, 4, 6, is abundant." 
Given a number, determine if it is perfect, abundant, or deficient. 

输入:

A list of N positive integers (none greater than 60,000), with 1 < N < 100. A 0 will mark the end of the list.

输出:

The first line of output should read PERFECTION OUTPUT. The next N lines of output should list for each input integer whether it is perfect, deficient, or abundant, as shown in the example below. Format counts: the echoed integers should be right justified within the first 5 spaces of the output line, followed by two blank spaces, followed by the description of the integer. The final line of output should read END OF OUTPUT.

从1994年微软章程的数论:“如果a b c是整数且a=bc称,a为b或c的倍数,b或c称为a的除数或因子。”如果c不是1或-1,b被称为a的适当除数。包括0的偶数整数是2的倍数,例如,-4、0、2、10;奇数整数是一个不是偶数的整数,例如,-5、1、3、9。一个完美数是一个等于所有正因子的和的正整数;例如,6,等于1+2+3,28,等于1+2+4+7+14,是完美数。不完美的正数是不完美的,根据它的正的因子的和比数本身是不足的还是充足的。因此,9与适当的因子,3是不足的;12,有适当的因子1,2,3,4,6,是丰富的。”给定一个数字,确定它是完美的、充足的还是不足的。

输入:

N个正整数的列表(不大于60,000),包含1<N<100。A0将表示该列表的结束。

输出:

输出的第一行应该读取完美的输出。接下来的N行输出应该列出每个输入整数,无论它是完美的、有缺陷的还是充足的,如下面的示例所示。为了计数:重复的整数应该在输出线的前5个空格内正确地证明,然后是两个空格,然后是对整数的描述。输出的最后一行应该读取输出的结尾。

TensorFlow 2.12是一个机器学习框架的版本。要安装TensorFlow 2.12,你可以按照以下步骤进行操作: 1. 直接安装TensorFlow:从2022年12月起,tensorflow-gpu已经合并到tensorflow包中了。你可以使用以下命令安装TensorFlow 2.12.0版本: ``` pip install tensorflow==2.12.0 -i https://pypi.tuna.tsinghua.edu.cn/simple ``` 2. 激活环境:如果你使用的是conda环境,可以使用以下命令激活tensorflow2_cpu环境: ``` conda activate tensorflow2_cpu ``` 3. 安装TensorFlow 2.12.0(CPU版本):如果你想安装CPU版本的TensorFlow 2.12.0,可以使用以下命令: ``` pip install tensorflow-cpu==2.12.0 -i https://pypi.tuna.tsinghua.edu.cn/simple/ ``` 4. 适配notebook:如果你想在Jupyter Notebook中使用TensorFlow 2.12.0,可以使用以下命令安装ipykernel并将其适配到tensorflow2_cpu环境: ``` pip install ipykernel python -m ipykernel install --name tensorflow2_cpu ``` 需要注意的是,截至到写这篇回答时(2023.4.4),国内的pip源可能还没有更新TensorFlow 2.12.0的包名,所以建议使用官方源或者等待一段时间再尝试安装。如果安装出错,可以多次尝试,可能是因为网络不好导致的。 #### 引用[.reference_title] - *1* [【已解决】【Tensorflow2.12.0版本以后合并CPU和GPU版】Tensorflow-gpu==2.12.0 安装失败解决办法](https://blog.csdn.net/void_zk/article/details/131379478)[target="_blank" data-report-click={"spm":"1018.2226.3001.9630","extra":{"utm_source":"vip_chatgpt_common_search_pc_result","utm_medium":"distribute.pc_search_result.none-task-cask-2~all~insert_cask~default-1-null.142^v91^insert_down1,239^v3^insert_chatgpt"}} ] [.reference_item] - *2* *3* [tensorflow1 tensorflow 2 安装配置(cpu+gpu)新版gpu2.12](https://blog.csdn.net/ziqibit/article/details/129959068)[target="_blank" data-report-click={"spm":"1018.2226.3001.9630","extra":{"utm_source":"vip_chatgpt_common_search_pc_result","utm_medium":"distribute.pc_search_result.none-task-cask-2~all~insert_cask~default-1-null.142^v91^insert_down1,239^v3^insert_chatgpt"}} ] [.reference_item] [ .reference_list ]
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值