CF1474B.Different Divisors

入门

通过率:0%

时间限制:1.00s

内存限制:256MB

AC君温馨提醒

该题目为【codeforces】题库的题目,您提交的代码将被提交至codeforces进行远程评测,并由ACGO抓取测评结果后进行展示。由于远程测评的测评机由其他平台提供,我们无法保证该服务的稳定性,若提交后无反应,请等待一段时间后再进行重试。

题目描述

Positive integer xx is called divisor of positive integer yy, if yy is divisible by xx without remainder. For example, 11 is a divisor of 77 and 33 is not divisor of 88.

We gave you an integer dd and asked you to find the smallest positive integer aa, such that

  • aa has at least 44 divisors;
  • difference between any two divisors of aa is at least dd.

正整数 xx 被称为正整数 yy 的约数,当且仅当 yy 能被 xx 整除(即余数为 00)。例如,11 是 77 的约数,而 33 不是 88 的约数。

我们给出一个整数 dd,要求你找出最小的正整数 aa,使得:

  • aa 至少有 44 个约数;
  • aa 的任意两个约数之间的差值至少为 dd。

输入格式

The first line contains a single integer tt (1≤t≤30001 \leq t \leq 3000) — the number of test cases.

The first line of each test case contains a single integer dd (1≤d≤100001 \leq d \leq 10000).

第一行包含一个整数 tt(1≤t≤30001 \leq t \leq 3000)—— 表示测试用例的数量。

每个测试用例的第一行包含一个整数 dd(1≤d≤100001 \leq d \leq 10000)。

输出格式

For each test case print one integer aa — the answer for this test case.

对于每个测试用例,输出一个整数 aa —— 该测试用例的答案。

输入输出样例

  • 输入#1

    2
    1
    2

    输出#1

    6
    15

说明/提示

In the first test case, integer 66 have following divisors: [1,2,3,6][1, 2, 3, 6]. There are 44 of them and the difference between any two of them is at least 11. There is no smaller integer with at least 44 divisors.

In the second test case, integer 1515 have following divisors: [1,3,5,15][1, 3, 5, 15]. There are 44 of them and the difference between any two of them is at least 22.

The answer 1212 is INVALID because divisors are [1,2,3,4,6,12][1, 2, 3, 4, 6, 12]. And the difference between, for example, divisors 22 and 33 is less than d=2d=2.

在第一个测试用例中,整数 66 的所有正因数为:[1,2,3,6][1, 2, 3, 6]。共有 44 个因数,且其中任意两个因数之差至少为 11。不存在比 66 更小的、至少有 44 个因数的整数。

在第二个测试用例中,整数 1515 的所有正因数为:[1,3,5,15][1, 3, 5, 15]。共有 44 个因数,且其中任意两个因数之差至少为 22。

答案 1212 是无效的,因为其因数为 [1,2,3,4,6,12][1, 2, 3, 4, 6, 12],而例如因数 22 与 33 的差小于 d=2d = 2。

输入解题思路,AI测评打分。不知道怎么写?

首页