CF1474B.Different Divisors

普及/提高-

通过率:0%

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 .

输入格式

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

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

输出格式

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

输入输出样例

  • 输入#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 .

首页