A. Greatest Convex
You are given an integer . Find the largest integer , where , such that is a multiple of , or determine that no such exists.
denotes the factorial of , which is defined recursively as for with the base case of . For example, .
If and are integers, then is a multiple of if there exists an integer such that . For example, is a multiple of but is not a multiple of .
The first line contains a single integer () — the number of test cases. The description of test cases follows.
The only line of each test case contains a single integer ().
For each test case output a single integer — the largest possible integer that satisfies the conditions above.
If no such exists, output .
CODE OF THE QUESTION -------
int n;
cin >>n;
cout<<n-1<<endl;


No comments:
Post a Comment