Interesting Representation solution codechef
-
For Solution
Click Here!
Given a positive integer NN, find two positive integers AA and BB, such that A−B=NA−B=N and the number of distinct prime factors of AA and BB are equal. If there exist multiple pairs of values of AA and BB satisfying the given conditions, you can output any one of them.
Interesting Representation solution codechef
- First line will contain TT, number of testcases. Then the testcases follow.
- Each testcase contains of a single line of input, integer NN.
Output Format
For each testcase, output in a single line two space separated integers AA and BB. If there are multiple answers, you can output any one of them.
Interesting Representation solution codechef
- 1≤T≤10001≤T≤1000
- 1≤N≤10161≤N≤1016
- 1≤A,B≤10181≤A,B≤1018
Subtasks
Subtask 1 (100 points): Original constraints
Interesting Representation solution codechef
3
1
8
135
Sample Output 1
3 2
97 89
1071 936
-
For Solution
Click Here!