提交时间:2024-01-26 20:52:46
运行 ID: 38366
#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; }