Physical Address
304 North Cardinal St.
Dorchester Center, MA 02124
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:
###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.
###Subtasks
Input:
5
1
3
5
8
10
Output:
1 1
1 3
1 5
1 8
2 5
#include <iostream>
using namespace std;
int main() {
// your code goes here
int t;
cin>>t;
while(t--){
int n;
cin>>n;
cout<<"1 "<<n<<endl;
}
return 0;
}
# cook your dish here
T=int(input())
while(T>0):
N=int(input())
print(1, N)
T-=1
/* 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
{
// your code goes here
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);
}
}
}
}
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
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 >>