MCPcopy Create free account
hub / github.com/Vishruth-S/CompetitiveCode / main

Function main

CodeChef_problems/Strike or Spare/Solution.cpp:4–21  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

2using namespace std;
3
4int main()
5{
6 int t; // t is the no of test cases
7 cin>>t;
8 while(t--)
9 { int n,q,i;
10 cin>>n; // n is the length of pin
11 if(n%2==0) // if n is even
12 q=n/2; // q is the length of half string
13 else q=(n-1)/2; // q is the length of half string
14 cout<<1<<" "<<1;
15 for(i=0;i<q;i++)
16 cout<<0; // palindrome can be composed in 10^q times
17 cout<<endl;
18 }
19
20 return 0;
21}

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected