CF1855B.Longest Divisors Interval
普及/提高-
通过率:0%
AC君温馨提醒
该题目为【codeforces】题库的题目,您提交的代码将被提交至codeforces进行远程评测,并由ACGO抓取测评结果后进行展示。由于远程测评的测评机由其他平台提供,我们无法保证该服务的稳定性,若提交后无反应,请等待一段时间后再进行重试。
题目描述
Given a positive integer n , find the maximum size of an interval [l,r] of positive integers such that, for every i in the interval (i.e., l≤i≤r ), n is a multiple of i .
Given two integers l≤r , the size of the interval [l,r] is r−l+1 (i.e., it coincides with the number of integers belonging to the interval).
输入格式
The first line contains a single integer t ( 1≤t≤104 ) — the number of test cases.
The only line of the description of each test case contains one integer n ( 1≤n≤1018 ).
输出格式
For each test case, print a single integer: the maximum size of a valid interval.
输入输出样例
输入#1
10 1 40 990990 4204474560 169958913706572972 365988220345828080 387701719537826430 620196883578129853 864802341280805662 1000000000000000000
输出#1
1 2 3 6 4 22 3 1 2 2
说明/提示
In the first test case, a valid interval with maximum size is [1,1] (it's valid because n=1 is a multiple of 1 ) and its size is 1 .
In the second test case, a valid interval with maximum size is [4,5] (it's valid because n=40 is a multiple of 4 and 5 ) and its size is 2 .
In the third test case, a valid interval with maximum size is [9,11] .
In the fourth test case, a valid interval with maximum size is [8,13] .
In the seventh test case, a valid interval with maximum size is [327869,327871] .