提交时间:2024-11-22 14:22:44
运行 ID: 57253
#include<iostream> using namespace std; int main() { int a,b; cin>>a>>b; int S=0; for(int i=1;i<=min(a,b);i++){ if(a%i==0&&b%i==0){ S+=1; cout<<i<<" "; } } cout<<endl<<S; return 0; }