304 North Cardinal St.
Dorchester Center, MA 02124

# Hidden Numbers CodeChef Solution

## Problem – Hidden Numbers CodeChef Solution

Salmon has some hidden numbers that he wants you to find!

Given an integer N, find and output any two integers A and B such that:

• 1≤A,B≤10^9, and
• AB=N.

###Input: The first line of input consists of a single integer T (1≤T≤10^5) — the number of testcases.

The next T lines will consist of one integer, N (1≤ N≤10^9).

###Output: For each of the T testcases, output two space-separated integers A and B.

### Sample 1:

``````Input:
5
1
3
5
8
10
Output:
1 1
1 3
1 5
1 8
2 5
``````

## Hidden Numbers CodeChef Solution in C++14

``````#include <iostream>
using namespace std;

int main() {
int t;
cin>>t;
while(t--){
int n;
cin>>n;
cout<<"1 "<<n<<endl;
}
return 0;
}
``````

## Hidden Numbers CodeChef Solution in Pyth 3

``````# cook your dish here
T=int(input())
while(T>0):
N=int(input())
print(1, N)
T-=1``````

## Hidden Numbers CodeChef Solution in Java

``````/* package codechef; // don't place package name! */

import java.util.*;
import java.lang.*;
import java.io.*;

/* Name of the class has to be "Main" only if the class is public. */
class Codechef
{
public static void main (String[] args) throws java.lang.Exception
{
Scanner sc=new Scanner(System.in);
int a=sc.nextInt();
for(int i=0;i<a;i++){
int n=sc.nextInt();
if(n==10){
System.out.println("2"+" " +"5");
}
else{
System.out.println("1"+ " " +n);
}
}
}
}``````
##### Hidden Numbers CodeChef Solution Review:

In our experience, we suggest you solve this Hidden Numbers CodeChef Solution and gain some new skills from Professionals completely free and we assure you will be worth it.

If you are stuck anywhere between any coding problem, just visit Queslers to get the Hidden Numbers CodeChef Solution

Find on CodeChef

##### Conclusion:

I hope this Hidden Numbers CodeChef Solution would be useful for you to learn something new from this problem. If it helped you then don’t forget to bookmark our site for more Coding Solutions.

This Problem is intended for audiences of all experiences who are interested in learning about Data Science in a business context; there are no prerequisites.

Keep Learning!

More Coding Solutions >>

LeetCode Solutions

Hacker Rank Solutions

CodeChef Solutions