1009
签到
#include <bits/stdc++.h>
using namespace std;
int main() {
int t;
cin>>t;
while(t--) {
int a,b,c;
cin>>a>>b>>c;
int t=max(a,b);
bool ok=false;
int pq=a*b-1;
while(!ok) {
if(pq%t!=0) {
t++;
}else ok=true;
}
int ans=0;
ans=c*b%t;
cout<<t<<endl;
if(t<pq)
cout<<ans<<endl;
else cout<<"shuanq"<<endl;
}
}
1002
#include <bits/stdc++.h>
using namespace std;
int main() {
int n;
cin>>n;
while(n--) {
string s;
cin>>s;
int num = s.size();
for(int i=0;i<num;i++) {
if(s[i]<='9' && s[i]>='0')
cout<<s[i];
if(s[i]==')' || s[i]=='(' ||s[i]==',')
cout<<s[i];
}
}
return 0;
}