C++ to Python
签到题
输出''('、')'、 ','及数字
Problem - 7151 (hdu.edu.cn)
#includeusing namespace std; #define js ios::sync_with_stdio(false);cin.tie(0); cout.tie(0) #define debug system("pause") #define endl "n" int main(){ int T;cin>>T; string s,ans; while(T--){ cin>>s; ans.clear(); for(int i=0;i ='0' and s[i]<='9'){ ans+=s[i]; } cout<
ShuanQ
数论题
输出P*Q-1的质因子,并要求其大于max(P,Q,E)
Problem - 7158 (hdu.edu.cn)
#includeusing namespace std; typedef long long ll; int main(){ int T;cin>>T; ll P,Q,E; while(T--){ cin>>P>>Q>>E; ll maxx=max(P,Q); maxx=max(maxx,E); ll u = P*Q-1; for(ll i=2;i<=sqrt(u);i++){ while(u%i==0) u/=i; } if(u>maxx) cout<



