Skip to content

Commit af0cdbb

Browse files
authored
create 1511_B_GCD_Length.cpp (aaryahjolia#113)
1 parent ff52c56 commit af0cdbb

File tree

1 file changed

+34
-0
lines changed

1 file changed

+34
-0
lines changed
Lines changed: 34 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,34 @@
1+
// A WINNER IS A DREAMER WHO NEVER GIVES UP !!!
2+
3+
#include <bits/stdc++.h>
4+
using namespace std;
5+
#define ll long long int
6+
7+
int main()
8+
{
9+
int t;
10+
cin>>t;
11+
while(t--)
12+
{
13+
int a,b,c;
14+
cin>>a>>b>>c;
15+
string s,t;
16+
s.push_back('1');
17+
for(int i=a-1;i>0;i--)
18+
{
19+
s.push_back('0');
20+
}
21+
if(b-c>0)
22+
t.push_back('1');
23+
for(int i=b-c-1;i>0;i--)
24+
{
25+
t.push_back('0');
26+
}
27+
t.push_back('1');
28+
for(int i=c-1;i>0;i--)
29+
{
30+
t.push_back('0');
31+
}
32+
cout<<s<<" "<<t<<endl;
33+
}
34+
}

0 commit comments

Comments
 (0)