Katari and his love for Mex
Practice
4 (1 votes)
Prime factorization
Very Easy
Very Easy
Problem
38% Success 453 Attempts 10 Points 2s Time Limit 256MB Memory 1024 KB Max Code
As we all know, Katari is very desperate about winning every game he plays. So, he needs your help to win the games using your knowledge on Mex . Mex is an ancronym for Minimum Excludant.
Mex of a number in this game can be defined as the minimum positive integer that is not in the set containing the Mex of all the divisors of the number.
Input :
First line of the input contains t, number of test case.
Next t lines contains a number n, to which you have to find the Mex.
1 <= t <= 100000
1 <= n <= 10^11
Output :
Output t lines each line containing the value of Mex of number.
Submissions
Please login to view your submissions
Similar Problems
Points:10
1 votes
Tags:
Very-Easy
Points:10
10 votes
Tags:
Integer FactorizationAlgorithmsMathMathamaticsFactorizationNumber Theory
Editorial