Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include<iostream>
- #include<cmath>
- #include<string>
- #include <iomanip>
- long long UCLN(long long a, long long b){
- if(b==0){
- return a;
- } else {
- return UCLN(b,a%b);
- }
- }
- using namespace std;
- int main() {
- int t;
- cin >> t;
- while(t--){
- long long a,x,y,i,j;
- cin >> a >> x >> y;
- long long lap = UCLN(x,y);
- for(i = 0; i<lap; i++){
- cout << a;
- }
- cout << endl;
- }
- }
Add Comment
Please, Sign In to add comment