-
Notifications
You must be signed in to change notification settings - Fork 0
/
gcdlength.cpp
51 lines (40 loc) · 1.07 KB
/
gcdlength.cpp
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
#include <bits/stdc++.h>
using namespace std;
// Shortcuts for data types
#define ll long long
#define ull unsigned long long
#define ld long double
// Shortcuts for common functions
#define pb push_back
#define mp make_pair
#define fi first
#define se second
// Constants
const int MOD = 1e9 + 7;
const int INF = 1e9;
const ll LINF = 1e18;
// Utility functions
template<typename T> void read(T &x) { cin >> x; }
template<typename T> void write(T x) { cout << x << ' '; }
template<typename T> void writeln(T x) { cout << x << '\n'; }
// Faster I/O
void fastIO() {
ios::sync_with_stdio(0);
cin.tie(0);
cout.tie(0);
}
// Debugging (comment out in production)
#define dbg(x) cerr << #x << " = " << (x) << endl;
int main() {
fastIO();
int t = 1;
cin >> t; // Uncomment if multiple test cases
while (t--) {
int a ,b,c;
cin>>a>>b>>c;
string firstPart = "1" + string(a - 1, '0');
string secondPart = string(b - c + 1, '1') + string(c - 1, '0');
cout << firstPart << " " << secondPart << endl;
}
return 0;
}