摘要: 5.1 简单数学 PAT A1069/B1019 The Black Hole of Numbers (20分) For any 4-digit integer except the ones with all the digits being the same, if we sort the di 阅读全文
posted @ 2020-01-31 16:59 程序员小应 阅读(171) 评论(0) 推荐(0) 编辑
摘要: PAT B1030/A1085 完美数列 (25分) 给定一个正整数数列,和正整数 p,设这个数列中的最大值是 M,最小值是 m,如果 M≤mp,则称这个数列是完美数列。 现在给定参数 p 和一些正整数,请你从中选择尽可能多的数构成一个完美数列。 输入格式: 输入第一行给出两个正整数 N 和 p,其 阅读全文
posted @ 2020-01-31 10:10 程序员小应 阅读(149) 评论(0) 推荐(0) 编辑